Documentation
¶
Index ¶
- Constants
- func OnAddServiceToSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)
- func OnAddUserToSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)
- func OnRemoveServiceFromSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)
- func OnRemoveUserFromSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)
- func OnSupportGroupCreateAuthz(db database.Database, e event.Event, authz openfga.Authorization)
- func OnSupportGroupDeleteAuthz(db database.Database, e event.Event, authz openfga.Authorization)
- type AddServiceToSupportGroupEvent
- type AddUserToSupportGroupEvent
- type CreateSupportGroupEvent
- type DeleteSupportGroupEvent
- type GetSupportGroupEvent
- type ListSupportGroupCcrnsEvent
- type ListSupportGroupsEvent
- type RemoveServiceFromSupportGroupEvent
- type RemoveUserFromSupportGroupEvent
- type SupportGroupHandler
- type SupportGroupHandlerError
- type UpdateSupportGroupEvent
Constants ¶
const ( ListSupportGroupsEventName event.EventName = "ListSupportGroups" GetSupportGroupEventName event.EventName = "GetSupportGroup" CreateSupportGroupEventName event.EventName = "CreateSupportGroup" UpdateSupportGroupEventName event.EventName = "UpdateSupportGroup" DeleteSupportGroupEventName event.EventName = "DeleteSupportGroup" AddServiceToSupportGroupEventName event.EventName = "AddServiceToSupportGroup" RemoveServiceFromSupportGroupEventName event.EventName = "RemoveServiceFromSupportGroup" AddUserToSupportGroupEventName event.EventName = "AddUserToSupportGroup" RemoveUserFromSupportGroupEventName event.EventName = "RemoveUserFromSupportGroup" ListSupportGroupCcrnsEventName event.EventName = "ListSupportGroupCcrns" )
Variables ¶
This section is empty.
Functions ¶
func OnAddServiceToSupportGroup ¶ added in v1.47.0
OnAddServiceToSupportGroup is a handler for the AddServiceToSupportGroupEvent It creates an OpenFGA relation tuple between the support group and the service
func OnAddUserToSupportGroup ¶ added in v1.47.0
OnAddUserToSupportGroup is a handler for the AddUserToSupportGroupEvent It creates an OpenFGA relation tuple between the user and the support group
func OnRemoveServiceFromSupportGroup ¶ added in v1.47.0
func OnRemoveServiceFromSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)
OnRemoveServiceFromSupportGroup is a handler for the RemoveServiceFromSupportGroupEvent It removes the OpenFGA relation tuple between the support group and the service
func OnRemoveUserFromSupportGroup ¶ added in v1.47.0
OnRemoveUserFromSupportGroup is a handler for the RemoveUserFromSupportGroupEvent It removes the OpenFGA relation tuple between the user and the support group
func OnSupportGroupCreateAuthz ¶ added in v1.47.0
OnSupportGroupCreateAuthz is a handler for the CreateSupportGroupEvent It creates an OpenFGA relation tuple for the support group and the current user
func OnSupportGroupDeleteAuthz ¶ added in v1.47.0
OnServiceDeleteAuthz is a handler for the DeleteServiceEvent
Types ¶
type AddServiceToSupportGroupEvent ¶
func (*AddServiceToSupportGroupEvent) Name ¶
func (e *AddServiceToSupportGroupEvent) Name() event.EventName
type AddUserToSupportGroupEvent ¶
func (*AddUserToSupportGroupEvent) Name ¶
func (e *AddUserToSupportGroupEvent) Name() event.EventName
type CreateSupportGroupEvent ¶
type CreateSupportGroupEvent struct {
SupportGroup *entity.SupportGroup
}
func (*CreateSupportGroupEvent) Name ¶
func (e *CreateSupportGroupEvent) Name() event.EventName
type DeleteSupportGroupEvent ¶
type DeleteSupportGroupEvent struct {
SupportGroupID int64
}
func (*DeleteSupportGroupEvent) Name ¶
func (e *DeleteSupportGroupEvent) Name() event.EventName
type GetSupportGroupEvent ¶
type GetSupportGroupEvent struct {
SupportGroupID int64
SupportGroup *entity.SupportGroup
}
func (*GetSupportGroupEvent) Name ¶
func (e *GetSupportGroupEvent) Name() event.EventName
type ListSupportGroupCcrnsEvent ¶
type ListSupportGroupCcrnsEvent struct {
Filter *entity.SupportGroupFilter
Options *entity.ListOptions
Ccrns []string
}
func (*ListSupportGroupCcrnsEvent) Name ¶
func (e *ListSupportGroupCcrnsEvent) Name() event.EventName
type ListSupportGroupsEvent ¶
type ListSupportGroupsEvent struct {
Filter *entity.SupportGroupFilter
Options *entity.ListOptions
SupportGroups *entity.List[entity.SupportGroupResult]
}
func (*ListSupportGroupsEvent) Name ¶
func (e *ListSupportGroupsEvent) Name() event.EventName
type RemoveServiceFromSupportGroupEvent ¶
func (*RemoveServiceFromSupportGroupEvent) Name ¶
func (e *RemoveServiceFromSupportGroupEvent) Name() event.EventName
type RemoveUserFromSupportGroupEvent ¶
func (*RemoveUserFromSupportGroupEvent) Name ¶
func (e *RemoveUserFromSupportGroupEvent) Name() event.EventName
type SupportGroupHandler ¶
type SupportGroupHandler interface {
ListSupportGroups(*entity.SupportGroupFilter, *entity.ListOptions) (*entity.List[entity.SupportGroupResult], error)
GetSupportGroup(int64) (*entity.SupportGroup, error)
CreateSupportGroup(context.Context, *entity.SupportGroup) (*entity.SupportGroup, error)
UpdateSupportGroup(context.Context, *entity.SupportGroup) (*entity.SupportGroup, error)
DeleteSupportGroup(context.Context, int64) error
AddServiceToSupportGroup(int64, int64) (*entity.SupportGroup, error)
RemoveServiceFromSupportGroup(int64, int64) (*entity.SupportGroup, error)
AddUserToSupportGroup(int64, int64) (*entity.SupportGroup, error)
RemoveUserFromSupportGroup(int64, int64) (*entity.SupportGroup, error)
ListSupportGroupCcrns(*entity.SupportGroupFilter, *entity.ListOptions) ([]string, error)
}
func NewSupportGroupHandler ¶
func NewSupportGroupHandler(handlerContext common.HandlerContext) SupportGroupHandler
type SupportGroupHandlerError ¶
type SupportGroupHandlerError struct {
// contains filtered or unexported fields
}
func NewSupportGroupHandlerError ¶
func NewSupportGroupHandlerError(message string) *SupportGroupHandlerError
func (*SupportGroupHandlerError) Error ¶
func (e *SupportGroupHandlerError) Error() string
type UpdateSupportGroupEvent ¶
type UpdateSupportGroupEvent struct {
SupportGroup *entity.SupportGroup
}
func (*UpdateSupportGroupEvent) Name ¶
func (e *UpdateSupportGroupEvent) Name() event.EventName