support_group

package
v1.54.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
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

func OnAddServiceToSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)

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

func OnAddUserToSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)

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

func OnRemoveUserFromSupportGroup(db database.Database, e event.Event, authz openfga.Authorization)

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

func OnSupportGroupCreateAuthz(db database.Database, e event.Event, authz openfga.Authorization)

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

func OnSupportGroupDeleteAuthz(db database.Database, e event.Event, authz openfga.Authorization)

OnServiceDeleteAuthz is a handler for the DeleteServiceEvent

Types

type AddServiceToSupportGroupEvent

type AddServiceToSupportGroupEvent struct {
	SupportGroupID int64
	ServiceID      int64
}

func (*AddServiceToSupportGroupEvent) Name

type AddUserToSupportGroupEvent

type AddUserToSupportGroupEvent struct {
	SupportGroupID int64
	UserID         int64
}

func (*AddUserToSupportGroupEvent) Name

type CreateSupportGroupEvent

type CreateSupportGroupEvent struct {
	SupportGroup *entity.SupportGroup
}

func (*CreateSupportGroupEvent) Name

type DeleteSupportGroupEvent

type DeleteSupportGroupEvent struct {
	SupportGroupID int64
}

func (*DeleteSupportGroupEvent) Name

type GetSupportGroupEvent

type GetSupportGroupEvent struct {
	SupportGroupID int64
	SupportGroup   *entity.SupportGroup
}

func (*GetSupportGroupEvent) Name

type ListSupportGroupCcrnsEvent

type ListSupportGroupCcrnsEvent struct {
	Filter  *entity.SupportGroupFilter
	Options *entity.ListOptions
	Ccrns   []string
}

func (*ListSupportGroupCcrnsEvent) Name

type ListSupportGroupsEvent

type ListSupportGroupsEvent struct {
	Filter        *entity.SupportGroupFilter
	Options       *entity.ListOptions
	SupportGroups *entity.List[entity.SupportGroupResult]
}

func (*ListSupportGroupsEvent) Name

type RemoveServiceFromSupportGroupEvent

type RemoveServiceFromSupportGroupEvent struct {
	SupportGroupID int64
	ServiceID      int64
}

func (*RemoveServiceFromSupportGroupEvent) Name

type RemoveUserFromSupportGroupEvent

type RemoveUserFromSupportGroupEvent struct {
	SupportGroupID int64
	UserID         int64
}

func (*RemoveUserFromSupportGroupEvent) Name

type SupportGroupHandler

type SupportGroupHandler interface {
	ListSupportGroups(context.Context, *entity.SupportGroupFilter, *entity.ListOptions) (*entity.List[entity.SupportGroupResult], error)
	GetSupportGroup(context.Context, 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(context.Context, int64, int64) (*entity.SupportGroup, error)
	RemoveServiceFromSupportGroup(context.Context, int64, int64) (*entity.SupportGroup, error)
	AddUserToSupportGroup(context.Context, int64, int64) (*entity.SupportGroup, error)
	RemoveUserFromSupportGroup(context.Context, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL