Versions in this module Expand all Collapse all v0 v0.16.0 Dec 11, 2024 Changes in this version + const All + const BuiltInRoleAdmin + const ChannelCreatePermission + const ClientCreatePermission + const Deleted + const Disabled + const Enabled + const Freezed + const GroupCreatePermission + const OpDisableDomain + const OpEnableDomain + const OpRetrieveDomain + const OpUpdateDomain + const Unknown + func NewOperationPerm() svcutil.OperationPerm + func NewOperationPermissionMap() map[svcutil.Operation]svcutil.Permission + func NewRolesOperationPermissionMap() map[svcutil.Operation]svcutil.Permission + type Domain struct + Actions []string + Alias string + CreatedAt time.Time + CreatedBy string + ID string + Metadata Metadata + Name string + RoleID string + RoleName string + Status Status + Tags []string + UpdatedAt time.Time + UpdatedBy string + type DomainReq struct + Alias *string + Metadata *Metadata + Name *string + Status *Status + Tags *[]string + type DomainsPage struct + Domains []Domain + Limit uint64 + Offset uint64 + Total uint64 + func (page DomainsPage) MarshalJSON() ([]byte, error) + type Metadata map[string]interface + type Page struct + Actions []string + Dir string + ID string + IDs []string + Identity string + Limit uint64 + Metadata Metadata + Name string + Offset uint64 + Order string + RoleID string + RoleName string + Status Status + Tag string + Total uint64 + UserID string + type Repository interface + Delete func(ctx context.Context, id string) error + ListDomains func(ctx context.Context, pm Page) (DomainsPage, error) + RetrieveAllByIDs func(ctx context.Context, pm Page) (DomainsPage, error) + RetrieveByID func(ctx context.Context, id string) (Domain, error) + RetrieveByUserAndID func(ctx context.Context, userID, id string) (Domain, error) + Save func(ctx context.Context, d Domain) (Domain, error) + Update func(ctx context.Context, id string, userID string, d DomainReq) (Domain, error) + type Service interface + CreateDomain func(ctx context.Context, sesssion authn.Session, d Domain) (Domain, error) + DeleteUserFromDomains func(ctx context.Context, id string) error + DisableDomain func(ctx context.Context, sesssion authn.Session, id string) (Domain, error) + EnableDomain func(ctx context.Context, sesssion authn.Session, id string) (Domain, error) + FreezeDomain func(ctx context.Context, sesssion authn.Session, id string) (Domain, error) + ListDomains func(ctx context.Context, sesssion authn.Session, page Page) (DomainsPage, error) + RetrieveDomain func(ctx context.Context, sesssion authn.Session, id string) (Domain, error) + UpdateDomain func(ctx context.Context, sesssion authn.Session, id string, d DomainReq) (Domain, error) + func New(repo Repository, policy policies.Service, idProvider supermq.IDProvider, ...) (Service, error) + type Status uint8 + const AllStatus + const DeletedStatus + const DisabledStatus + const EnabledStatus + const FreezeStatus + func ToStatus(status string) (Status, error) + func (s *Status) UnmarshalJSON(data []byte) error + func (s Status) MarshalJSON() ([]byte, error) + func (s Status) String() string