mirror of
https://github.com/absmach/magistrala.git
synced 2026-06-23 04:10:28 +00:00
61d0427898
Signed-off-by: dusan <borovcanindusan1@gmail.com>
29 lines
533 B
Go
29 lines
533 B
Go
// Copyright (c) Abstract Machines
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package private
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/absmach/magistrala/groups"
|
|
)
|
|
|
|
type Service interface {
|
|
RetrieveById(ctx context.Context, id string) (groups.Group, error)
|
|
}
|
|
|
|
var _ Service = (*service)(nil)
|
|
|
|
func New(repo groups.Repository) Service {
|
|
return service{repo}
|
|
}
|
|
|
|
type service struct {
|
|
repo groups.Repository
|
|
}
|
|
|
|
func (svc service) RetrieveById(ctx context.Context, ids string) (groups.Group, error) {
|
|
return svc.repo.RetrieveByID(ctx, ids)
|
|
}
|