Documentation
¶
Index ¶
- Variables
- func CreateURN(projectSlug, keyName string) string
- type ActivityService
- type DistinctValueFilter
- type Filter
- type Key
- type KeyLogData
- type ProjectService
- type RelationService
- type Repository
- type ResourceService
- type Service
- func (s Service) CreateKey(ctx context.Context, key Key) (Key, error)
- func (s Service) Get(ctx context.Context, filter Filter) ([]ServiceData, error)
- func (s Service) GetDistinctValues(ctx context.Context, filter DistinctValueFilter) ([]any, error)
- func (s Service) GetKeyByURN(ctx context.Context, urn string) (Key, error)
- func (s Service) Upsert(ctx context.Context, sd ServiceData) (ServiceData, error)
- type ServiceData
- type Transactor
- type UserService
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type ActivityService ¶ added in v0.6.26
type DistinctValueFilter ¶ added in v0.7.9
func (DistinctValueFilter) JSONPath ¶ added in v0.7.9
func (f DistinctValueFilter) JSONPath() string
func (DistinctValueFilter) KeyName ¶ added in v0.7.9
func (f DistinctValueFilter) KeyName() string
KeyName returns the service data key name (the first path segment).
type Key ¶
type Key struct {
ID string
URN string
ProjectID string
ProjectSlug string
Name string
Description string
ResourceID string
}
func (Key) ToKeyLogData ¶ added in v0.6.26
func (key Key) ToKeyLogData() KeyLogData
type KeyLogData ¶ added in v0.6.26
type ProjectService ¶
type RelationService ¶
type RelationService interface {
Create(ctx context.Context, rel relation.RelationV2) (relation.RelationV2, error)
CheckPermission(ctx context.Context, usr user.User, resourceNS namespace.Namespace, resourceIdxa string, action action.Action) (bool, error)
LookupResources(ctx context.Context, resourceType, permission, subjectType, subjectID string) ([]string, error)
}
type Repository ¶
type Repository interface {
Transactor
CreateKey(ctx context.Context, key Key) (Key, error)
Upsert(ctx context.Context, servicedata ServiceData) (ServiceData, error)
GetKeyByURN(ctx context.Context, URN string) (Key, error)
Get(ctx context.Context, filter Filter) ([]ServiceData, error)
GetDistinctKeyValues(ctx context.Context, filter DistinctValueFilter) ([]any, error)
}
type ResourceService ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(logger log.Logger, repository Repository, resourceService ResourceService, relationService RelationService, projectService ProjectService, userService UserService, activityService ActivityService) *Service
func (Service) GetDistinctValues ¶ added in v0.7.9
GetDistinctValues returns the distinct values found at a metadata path across all entities of a namespace, e.g. all distinct "functional_roles.roles" values across every user. The caller must have view permission on the queried service data key. Results are paginated (default page size defaultDistinctValuesSize).
func (Service) GetKeyByURN ¶ added in v0.6.29
func (Service) Upsert ¶ added in v0.6.22
func (s Service) Upsert(ctx context.Context, sd ServiceData) (ServiceData, error)
type ServiceData ¶ added in v0.6.22
type Transactor ¶
Click to show internal directories.
Click to hide internal directories.