3
0
Files
corteza/system/service/role.go
2019-04-03 14:19:15 +02:00

28 lines
550 B
Go

package service
import (
"context"
"testing"
"github.com/crusttech/crust/system/internal/service"
"github.com/crusttech/crust/system/types"
)
type (
RoleService interface {
FindByID(roleID uint64) (*types.Role, error)
Find(filter *types.RoleFilter) ([]*types.Role, error)
}
)
var DefaultRole = service.DefaultRole
func Role(ctx context.Context) RoleService {
return DefaultRole.With(ctx)
}
// Expose the full Role API for testing
func TestRole(_ *testing.T, ctx context.Context) service.RoleService {
return DefaultRole.With(ctx)
}