service

package
v1.0.0-beta.231 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(subjectAdapter subject.Adapter) (*Service, error)

New creates a new subject service

func (*Service) Create

func (s *Service) Create(ctx context.Context, input subject.CreateInput) (subject.Subject, error)

Create creates a new subject

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, id models.NamespacedID) error

Delete deletes a subject by ID

func (*Service) GetById

func (s *Service) GetById(ctx context.Context, id models.NamespacedID) (subject.Subject, error)

GetById gets a subject by ID

func (*Service) GetByIdOrKey

func (s *Service) GetByIdOrKey(ctx context.Context, orgId string, idOrKey string) (subject.Subject, error)

GetByIdOrKey gets a subject by ID or key

func (*Service) GetByKey

func (s *Service) GetByKey(ctx context.Context, key models.NamespacedKey) (subject.Subject, error)

GetByKey gets a subject by key

func (*Service) List

List lists subjects

func (*Service) RegisterHooks

func (s *Service) RegisterHooks(hooks ...models.ServiceHook[subject.Subject])

func (*Service) Update

func (s *Service) Update(ctx context.Context, input subject.UpdateInput) (subject.Subject, error)

Update updates an existing subject

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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