service

package
v0.2.32 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMessageHandlerOrchestrator

func NewMessageHandlerOrchestrator(opts ...messageHandlerOrchestratorOption) port.MessageHandler

NewMessageHandlerOrchestrator creates a new message handler orchestrator using the option pattern

func WithCommitteePublisher

func WithCommitteePublisher(publisher port.CommitteePublisher) committeeWriterOrchestratorOption

WithCommitteePublisher sets the committee publisher

func WithCommitteePublisherForMessageHandler added in v0.2.30

func WithCommitteePublisherForMessageHandler(publisher port.CommitteePublisher) messageHandlerOrchestratorOption

WithCommitteePublisherForMessageHandler sets the committee publisher for message handler

func WithCommitteeReader

func WithCommitteeReader(reader port.CommitteeReader) committeeReaderOrchestratorOption

WithCommitteeReader sets the committee reader

func WithCommitteeReaderForMessageHandler

func WithCommitteeReaderForMessageHandler(reader CommitteeReader) messageHandlerOrchestratorOption

WithCommitteeReaderForMessageHandler sets the committee reader for message handler

func WithCommitteeRetriever

func WithCommitteeRetriever(retriever port.CommitteeReader) committeeWriterOrchestratorOption

WithCommitteeRetriever sets the committee retriever

func WithCommitteeWriter

func WithCommitteeWriter(writer port.CommitteeWriter) committeeWriterOrchestratorOption

WithCommitteeWriter sets the committee writer

func WithCommitteeWriterForMessageHandler added in v0.2.30

func WithCommitteeWriterForMessageHandler(writer port.CommitteeWriter) messageHandlerOrchestratorOption

WithCommitteeWriterForMessageHandler sets the committee writer for message handler

func WithProjectRetriever

func WithProjectRetriever(retriever port.ProjectReader) committeeWriterOrchestratorOption

WithProjectRetriever sets the project retriever

func WithUserReader added in v0.2.15

func WithUserReader(reader port.UserReader) committeeWriterOrchestratorOption

WithUserReader sets the user reader

Types

type CommitteeDataReader added in v0.2.0

type CommitteeDataReader interface {
	// GetBase retrieves committee base information by UID and returns the revision
	GetBase(ctx context.Context, uid string) (*model.CommitteeBase, uint64, error)
	// GetSettings retrieves committee settings by UID and returns the revision
	GetSettings(ctx context.Context, uid string) (*model.CommitteeSettings, uint64, error)
	// GetBaseAttributeValue retrieves an attribute value by UID and returns the revision
	GetBaseAttributeValue(ctx context.Context, uid string, attributeName string) (any, error)
}

CommitteeDataReader defines the interface for committee-specific read operations

type CommitteeDataWriter added in v0.2.0

type CommitteeDataWriter interface {
	// Create inserts a new committee into the storage, along with its settings, when applicable
	Create(ctx context.Context, committee *model.Committee, sync bool) (*model.Committee, error)
	// Update modifies an existing committee in the storage
	Update(ctx context.Context, committee *model.Committee, revision uint64, sync bool) (*model.Committee, error)
	// UpdateSettings modifies the settings of an existing committee in the storage
	UpdateSettings(ctx context.Context, settings *model.CommitteeSettings, revision uint64, sync bool) (*model.CommitteeSettings, error)
	// Delete removes a committee and all its associated data (secondary indices, settings)
	Delete(ctx context.Context, uid string, revision uint64, sync bool) error
}

CommitteeDataWriter defines the interface for committee-specific write operations

type CommitteeDocumentDataReader added in v0.2.29

type CommitteeDocumentDataReader interface {
	GetDocumentMetadata(ctx context.Context, committeeUID, documentUID string) (*model.CommitteeDocument, uint64, error)
	GetDocumentFile(ctx context.Context, documentUID string) ([]byte, error)
}

CommitteeDocumentDataReader defines use case operations for reading documents.

func NewDocumentReaderOrchestrator added in v0.2.29

func NewDocumentReaderOrchestrator(opts ...DocumentReaderOption) CommitteeDocumentDataReader

type CommitteeDocumentDataWriter added in v0.2.29

type CommitteeDocumentDataWriter interface {
	UploadDocument(ctx context.Context, doc *model.CommitteeDocument, fileData []byte, sync bool) (*model.CommitteeDocument, error)
	DeleteDocument(ctx context.Context, committeeUID, documentUID string, revision uint64, sync bool) error
}

CommitteeDocumentDataWriter defines use case operations for writing documents.

func NewDocumentWriterOrchestrator added in v0.2.29

func NewDocumentWriterOrchestrator(opts ...DocumentWriterOption) CommitteeDocumentDataWriter

type CommitteeLinkDataReader added in v0.2.24

type CommitteeLinkDataReader interface {
	GetLink(ctx context.Context, committeeUID, linkUID string) (*model.CommitteeLink, uint64, error)
	ListLinks(ctx context.Context, committeeUID string) ([]*model.CommitteeLink, error)
	GetLinkFolder(ctx context.Context, committeeUID, folderUID string) (*model.CommitteeLinkFolder, uint64, error)
	ListLinkFolders(ctx context.Context, committeeUID string) ([]*model.CommitteeLinkFolder, error)
}

CommitteeLinkDataReader defines use case operations for reading links and folders.

func NewLinkReaderOrchestrator added in v0.2.24

func NewLinkReaderOrchestrator(opts ...LinkReaderOption) CommitteeLinkDataReader

type CommitteeLinkDataWriter added in v0.2.24

type CommitteeLinkDataWriter interface {
	CreateLink(ctx context.Context, link *model.CommitteeLink, sync bool) (*model.CommitteeLink, error)
	DeleteLink(ctx context.Context, committeeUID, linkUID string, revision uint64, sync bool) error
	CreateLinkFolder(ctx context.Context, folder *model.CommitteeLinkFolder, sync bool) (*model.CommitteeLinkFolder, error)
	DeleteLinkFolder(ctx context.Context, committeeUID, folderUID string, revision uint64, sync bool) error
}

CommitteeLinkDataWriter defines use case operations for writing links and folders.

func NewLinkWriterOrchestrator added in v0.2.24

func NewLinkWriterOrchestrator(opts ...LinkWriterOption) CommitteeLinkDataWriter

type CommitteeMemberDataReader added in v0.2.0

type CommitteeMemberDataReader interface {
	// GetMember retrieves a committee member by committee UID and member UID
	GetMember(ctx context.Context, committeeUID, memberUID string) (*model.CommitteeMember, uint64, error)
	// ListMembers retrieves all members for a given committee UID
	ListMembers(ctx context.Context, committeeUID string) ([]*model.CommitteeMember, error)
}

CommitteeMemberDataReader defines the interface for committee member read operations

type CommitteeMemberDataWriter added in v0.2.0

type CommitteeMemberDataWriter interface {
	// CreateMember inserts a new committee member into the storage
	CreateMember(ctx context.Context, member *model.CommitteeMember, sync bool) (*model.CommitteeMember, error)
	// UpdateMember modifies an existing committee member in the storage
	UpdateMember(ctx context.Context, member *model.CommitteeMember, revision uint64, sync bool) (*model.CommitteeMember, error)
	// DeleteMember removes a committee member
	DeleteMember(ctx context.Context, uid string, revision uint64, sync bool) error
}

CommitteeMemberDataWriter defines the interface for committee member write operations

type CommitteeReader

type CommitteeReader interface {
	CommitteeDataReader
	CommitteeMemberDataReader
}

CommitteeReader defines the interface for committee read operations

func NewCommitteeReaderOrchestrator

func NewCommitteeReaderOrchestrator(opts ...committeeReaderOrchestratorOption) CommitteeReader

NewCommitteeReaderOrchestrator creates a new committee reader use case using the option pattern

type CommitteeWriter

type CommitteeWriter interface {
	CommitteeDataWriter
	CommitteeMemberDataWriter
}

CommitteeWriter defines the interface for committee write operations

func NewCommitteeWriterOrchestrator

func NewCommitteeWriterOrchestrator(opts ...committeeWriterOrchestratorOption) CommitteeWriter

NewcommitteeWriterOrchestrator creates a new create committee use case using the option pattern

type DocumentReaderOption added in v0.2.29

type DocumentReaderOption func(*documentReaderOrchestrator)

func WithDocumentReader added in v0.2.29

type DocumentWriterOption added in v0.2.29

type DocumentWriterOption func(*documentWriterOrchestrator)

func WithDocumentPublisher added in v0.2.29

func WithDocumentPublisher(p port.CommitteePublisher) DocumentWriterOption

func WithDocumentReaderForWriter added in v0.2.29

func WithDocumentReaderForWriter(r port.CommitteeDocumentReader) DocumentWriterOption

func WithDocumentWriter added in v0.2.29

type LinkReaderOption added in v0.2.24

type LinkReaderOption func(*linkReaderOrchestrator)

func WithLinkReader added in v0.2.24

func WithLinkReader(r port.CommitteeLinkReader) LinkReaderOption

type LinkWriterOption added in v0.2.24

type LinkWriterOption func(*linkWriterOrchestrator)

func WithLinkPublisher added in v0.2.24

func WithLinkPublisher(p port.CommitteePublisher) LinkWriterOption

func WithLinkReaderForWriter added in v0.2.24

func WithLinkReaderForWriter(r port.CommitteeLinkReader) LinkWriterOption

func WithLinkWriter added in v0.2.24

func WithLinkWriter(w port.CommitteeLinkWriter) LinkWriterOption

Jump to

Keyboard shortcuts

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