grpc

package
v0.0.0-...-e2086a9 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CaseCommentMetadata = model.NewObjectMetadata(model.ScopeCaseComments, model.ScopeCases, []*model.Field{
	{Name: "id", Default: false},
	{Name: "etag", Default: true},
	{Name: "ver", Default: false},
	{Name: "created_at", Default: true},
	{Name: "created_by", Default: true},
	{Name: "updated_at", Default: true},
	{Name: "updated_by", Default: true},
	{Name: "text", Default: true},
	{Name: "edited", Default: true},
	{Name: "can_edit", Default: true},
	{Name: "author", Default: true},
	{Name: "role_ids", Default: false},
	{Name: "case_id", Default: false},
})

CaseCommentMetadata defines the fields available for case comment objects.

View Source
var CaseCommunicationMetadata = model.NewObjectMetadata("", "cases", []*model.Field{
	{Name: "etag", Default: true},
	{Name: "ver", Default: false},
	{Name: "id", Default: true},
	{Name: "communication_type", Default: true},
	{Name: "communication_id", Default: true},
})
View Source
var CaseFileMetadata = model.NewObjectMetadata("", "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "size", Default: true},
	{Name: "mime", Default: true},
	{Name: "name", Default: true},
	{Name: "created_at", Default: true},
	{Name: "created_by", Default: true},

	{Name: "source", Default: true},
})
View Source
var CaseLinkMetadata = model.NewObjectMetadata("", model.ScopeCases, []*model.Field{
	{Name: "etag", Default: true},
	{Name: "id", Default: false},
	{Name: "ver", Default: false},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "author", Default: true},
	{Name: "name", Default: true},
	{Name: "url", Default: true},
	{Name: "case_id", Default: false},
})
View Source
var CaseTimelineMetadata = model.NewObjectMetadata("", "cases", []*model.Field{
	{Name: string(model.TimelineEventTypeCall), Default: true},
	{Name: string(model.TimelineEventTypeChat), Default: true},
	{Name: string(model.TimelineEventTypeEmail), Default: true},
})
View Source
var CloseReasonGroupMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
})

CloseReasonGroupMetadata defines the fields available for close reason group objects.

View Source
var CloseReasonMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "close_reason_id", Default: false},
})

CloseReasonMetadata defines the fields available for close reason objects.

View Source
var PriorityMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "color", Default: true},
})

PriorityMetadata defines the fields available for priority objects.

View Source
var SLAConditionMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "name", Default: true},
	{Name: "priorities", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "reaction_time", Default: true},
	{Name: "resolution_time", Default: true},
	{Name: "sla_id", Default: true},
})

SLAConditionMetadata defines the fields available for SLA condition objects.

View Source
var ServiceMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "root_id", Default: true},
	{Name: "code", Default: true},
	{Name: "state", Default: true},
	{Name: "sla", Default: true},
	{Name: "group", Default: true},
	{Name: "assignee", Default: true},
	{Name: "default_priority", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "catalog_id", Default: false},
})
View Source
var SlaMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: true},
	{Name: "updated_at", Default: true},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "valid_from", Default: true},
	{Name: "valid_to", Default: true},
	{Name: "calendar", Default: true},
	{Name: "reaction_time", Default: true},
	{Name: "resolution_time", Default: true},
})

SlaMetadata defines the fields available for SLA objects.

View Source
var SourceMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "type", Default: true},
})

SourceMetadata defines the fields available for source objects.

View Source
var StatusConditionMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
	{Name: "initial", Default: true},
	{Name: "final", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
})

StatusConditionMetadata defines the fields available for status condition objects.

View Source
var StatusMetadata = model.NewObjectMetadata(model.ScopeDictionary, "", []*model.Field{
	{Name: "id", Default: true},
	{Name: "created_by", Default: true},
	{Name: "created_at", Default: true},
	{Name: "updated_by", Default: false},
	{Name: "updated_at", Default: false},
	{Name: "name", Default: true},
	{Name: "description", Default: true},
})

StatusMetadata defines the fields available for status objects.

Functions

func NormalizeResponseCommunications

func NormalizeResponseCommunications(res []*api.CaseCommunication, requestedFields []string) error
func NormalizeResponseLink(res *cases.CaseLink, opts shared.Fielder) error
func NormalizeResponseLinks(res *cases.CaseLinkList, requestedFields []string) error

func ValidateCaseCommunicationsCreate

func ValidateCaseCommunicationsCreate(input ...*model.CaseCommunication) error

Types

type CaseCommentHandler

type CaseCommentHandler interface {
	ListCaseComments(options.Searcher) ([]*model.CaseComment, error)
	UpdateCaseComment(options.Updator, *model.CaseComment) (*model.CaseComment, error)
	DeleteCaseComment(options.Deleter) (*model.CaseComment, error)
	PublishCaseComment(options.Creator, *model.CaseComment) (*model.CaseComment, error)
}

CaseCommentHandler defines the interface for managing case comments.

type CaseCommentService

type CaseCommentService struct {
	api.UnimplementedCaseCommentsServer
	// contains filtered or unexported fields
}

CaseCommentService implements the gRPC server for case comments.

func NewCaseCommentService

func NewCaseCommentService(app CaseCommentHandler) (*CaseCommentService, error)

NewCaseCommentService constructs a new CaseCommentService.

func (*CaseCommentService) DeleteComment

DeleteComment handles the gRPC request to delete a comment.

func (*CaseCommentService) ListComments

ListComments handles the gRPC request to list comments for a case.

func (*CaseCommentService) LocateComment

LocateComment handles the gRPC request to locate a comment by its etag.

func (*CaseCommentService) Marshal

func (s *CaseCommentService) Marshal(model *model.CaseComment) (*api.CaseComment, error)

Marshal converts a model.CaseComment to its gRPC representation.

func (*CaseCommentService) NormalizeResponse

func (s *CaseCommentService) NormalizeResponse(res interface{}, opts shared.Fielder) error

NormalizeResponse normalizes the response based on requested fields and etag handling.

func (*CaseCommentService) PublishComment

PublishComment handles the gRPC request to publish a comment to a case.

func (*CaseCommentService) UpdateComment

UpdateComment handles the gRPC request to update a comment.

type CaseCommunicationHandler

type CaseCommunicationHandler interface {
	ListCommunications(options.Searcher) ([]*model.CaseCommunication, error)
	LinkCommunication(createOpts options.Creator, input []*model.CaseCommunication) ([]*model.CaseCommunication, error)
	UnlinkCommunication(deleteOpts options.Deleter) (int64, error)
}

type CaseCommunicationService

type CaseCommunicationService struct {
	api.UnimplementedCaseCommunicationsServer
	// contains filtered or unexported fields
}

func (*CaseCommunicationService) LinkCommunication

func (*CaseCommunicationService) ListCommunications

func (*CaseCommunicationService) Marshal

func (*CaseCommunicationService) UnlinkCommunication

type CaseFileHandler

type CaseFileHandler interface {
	ListCaseFiles(options.Searcher) ([]*model.CaseFile, error)
	DeleteCaseFile(options.Deleter) (*model.CaseFile, error)
}

type CaseFileService

type CaseFileService struct {
	cases.UnimplementedCaseFilesServer
	// contains filtered or unexported fields
}

func NewCaseFileService

func NewCaseFileService(app CaseFileHandler) (*CaseFileService, error)

func (*CaseFileService) DeleteFile

func (s *CaseFileService) DeleteFile(ctx context.Context, req *cases.DeleteFileRequest) (*cases.File, error)

func (*CaseFileService) ListFiles

func (*CaseFileService) Marshal

func (s *CaseFileService) Marshal(m *model.CaseFile) (*cases.File, error)

Marshal converts a model.CaseFile to cases.File

type CaseLinkHandler

type CaseLinkHandler interface {
	ListCaseLinks(options.Searcher) ([]*model.CaseLink, error)
	CreateCaseLink(options.Creator, *model.CaseLink) (*model.CaseLink, error)
	UpdateCaseLink(options.Updator, *model.CaseLink) (*model.CaseLink, error)
	DeleteCaseLink(options.Deleter) (*model.CaseLink, error)
}

type CaseLinkService

type CaseLinkService struct {
	cases.UnimplementedCaseLinksServer
	// contains filtered or unexported fields
}

func NewCaseLinkService

func NewCaseLinkService(handler CaseLinkHandler) *CaseLinkService
func (s *CaseLinkService) LocateLink(
	ctx context.Context,
	req *cases.LocateLinkRequest,
) (*cases.CaseLink, error)

func (*CaseLinkService) Marshal

func (s *CaseLinkService) Marshal(m *model.CaseLink) (*cases.CaseLink, error)

Marshal converts a model.CaseLink to cases.CaseLink

type CaseTimelineHandler

type CaseTimelineHandler interface {
	GetTimeline(options.Searcher) (*model.CaseTimeline, error)
	GetTimelineCounter(options.Searcher) (*model.TimelineCounterResponse, error)
}

type CaseTimelineService

type CaseTimelineService struct {
	cases.UnimplementedCaseTimelineServer
	// contains filtered or unexported fields
}

func NewCaseTimelineService

func NewCaseTimelineService(app CaseTimelineHandler) (*CaseTimelineService, error)

func (*CaseTimelineService) GetTimeline

GetTimeline handles the gRPC request to get the timeline for a case.

func (*CaseTimelineService) GetTimelineCounter

GetTimelineCounter handles the gRPC request to get the counter for a case timeline.

func (*CaseTimelineService) MarshalCallEvent

func (s *CaseTimelineService) MarshalCallEvent(event *model.CallEvent) *cases.CallEvent

MarshalCallEvent converts a model.CallEvent to its gRPC representation.

func (*CaseTimelineService) MarshalChatEvent

func (s *CaseTimelineService) MarshalChatEvent(event *model.ChatEvent) *cases.ChatEvent

MarshalChatEvent converts a model.ChatEvent to its gRPC representation.

func (*CaseTimelineService) MarshalEmailEvent

func (s *CaseTimelineService) MarshalEmailEvent(event *model.EmailEvent) *cases.EmailEvent

MarshalEmailEvent converts a model.EmailEvent to its gRPC representation.

func (*CaseTimelineService) MarshalTimeline

func (s *CaseTimelineService) MarshalTimeline(timeline *model.CaseTimeline) (*cases.GetTimelineResponse, error)

MarshalTimeline converts a model.CaseTimeline to its gRPC representation.

type CloseReasonGroupHandler

type CloseReasonGroupHandler interface {
	ListCloseReasonGroup(options.Searcher) ([]*model.CloseReasonGroup, error)
	CreateCloseReasonGroup(options.Creator, *model.CloseReasonGroup) (*model.CloseReasonGroup, error)
	UpdateCloseReasonGroup(options.Updator, *model.CloseReasonGroup) (*model.CloseReasonGroup, error)
	DeleteCloseReasonGroup(options.Deleter) (*model.CloseReasonGroup, error)
}

CloseReasonGroupHandler defines the interface for managing close reason groups.

type CloseReasonGroupService

type CloseReasonGroupService struct {
	_go.UnimplementedCloseReasonGroupsServer
	// contains filtered or unexported fields
}

CloseReasonGroupService implements the gRPC server for close reason groups.

func NewCloseReasonGroupsService

func NewCloseReasonGroupsService(app CloseReasonGroupHandler) (*CloseReasonGroupService, error)

NewCloseReasonGroupsService constructs a new CloseReasonGroupService.

func (*CloseReasonGroupService) CreateCloseReasonGroup

CreateCloseReasonGroup handles the gRPC request to create a new close reason group.

func (*CloseReasonGroupService) DeleteCloseReasonGroup

DeleteCloseReasonGroup handles the gRPC request to delete a close reason group.

func (*CloseReasonGroupService) ListCloseReasonGroups

ListCloseReasonGroups handles the gRPC request to list close reason groups with filters and pagination.

func (*CloseReasonGroupService) LocateCloseReasonGroup

LocateCloseReasonGroup finds a close reason group by ID and returns it, or an error if not found or ambiguous.

func (*CloseReasonGroupService) Marshal

Marshal converts a model.CloseReasonGroup to its gRPC representation.

func (*CloseReasonGroupService) UpdateCloseReasonGroup

UpdateCloseReasonGroup handles the gRPC request to update an existing close reason group.

type CloseReasonHandler

type CloseReasonHandler interface {
	ListCloseReasons(options.Searcher, int64) ([]*model.CloseReason, error)
	CreateCloseReason(options.Creator, *model.CloseReason) (*model.CloseReason, error)
	UpdateCloseReason(options.Updator, *model.CloseReason) (*model.CloseReason, error)
	DeleteCloseReason(options.Deleter) (*model.CloseReason, error)
}

CloseReasonHandler defines the interface for managing close reasons.

type CloseReasonService

type CloseReasonService struct {
	cases.UnimplementedCloseReasonsServer
	// contains filtered or unexported fields
}

CloseReasonService implements the gRPC server for close reasons.

func NewCloseReasonService

func NewCloseReasonService(app CloseReasonHandler) (*CloseReasonService, error)

NewCloseReasonService constructs a new CloseReasonService.

func (*CloseReasonService) CreateCloseReason

func (s *CloseReasonService) CreateCloseReason(
	ctx context.Context,
	req *cases.CreateCloseReasonRequest,
) (*cases.CloseReason, error)

CreateCloseReason handles the gRPC request to create a new close reason.

func (*CloseReasonService) DeleteCloseReason

func (s *CloseReasonService) DeleteCloseReason(
	ctx context.Context,
	req *cases.DeleteCloseReasonRequest,
) (*cases.CloseReason, error)

DeleteCloseReason handles the gRPC request to delete a close reason.

func (*CloseReasonService) ListCloseReasons

ListCloseReasons handles the gRPC request to list close reasons with filters and pagination.

func (*CloseReasonService) LocateCloseReason

LocateCloseReason finds a close reason by ID and returns it, or an error if not found or ambiguous.

func (*CloseReasonService) Marshal

func (s *CloseReasonService) Marshal(model *model.CloseReason) (*cases.CloseReason, error)

Marshal converts a model.CloseReason to its gRPC representation.

func (*CloseReasonService) UpdateCloseReason

func (s *CloseReasonService) UpdateCloseReason(
	ctx context.Context,
	req *cases.UpdateCloseReasonRequest,
) (*cases.CloseReason, error)

UpdateCloseReason handles the gRPC request to update an existing close reason.

type PriorityHandler

type PriorityHandler interface {
	ListPriorities(options.Searcher, int64, int64) ([]*model.Priority, error)
	CreatePriority(options.Creator, *model.Priority) (*model.Priority, error)
	UpdatePriority(options.Updator, *model.Priority) (*model.Priority, error)
	DeletePriority(options.Deleter) (*model.Priority, error)
}

PriorityHandler defines the interface for managing priorities.

type PriorityService

type PriorityService struct {
	api.UnimplementedPrioritiesServer
	// contains filtered or unexported fields
}

PriorityService implements the gRPC server for priorities.

func NewPriorityService

func NewPriorityService(app PriorityHandler) (*PriorityService, error)

NewPriorityService constructs a new PriorityService.

func (*PriorityService) CreatePriority

func (s *PriorityService) CreatePriority(ctx context.Context, req *api.CreatePriorityRequest) (*api.Priority, error)

CreatePriority handles the gRPC request to create a new priority.

func (*PriorityService) DeletePriority

func (s *PriorityService) DeletePriority(ctx context.Context, req *api.DeletePriorityRequest) (*api.Priority, error)

DeletePriority handles the gRPC request to delete a priority.

func (*PriorityService) ListPriorities

func (s *PriorityService) ListPriorities(ctx context.Context, req *api.ListPriorityRequest) (*api.PriorityList, error)

ListPriorities handles the gRPC request to list priorities with filters and pagination.

func (*PriorityService) LocatePriority

LocatePriority finds a priority by ID and returns it, or an error if not found or ambiguous.

func (*PriorityService) Marshal

func (s *PriorityService) Marshal(model *model.Priority) (*api.Priority, error)

Marshal converts a model.Priority to its gRPC representation.

func (*PriorityService) UpdatePriority

func (s *PriorityService) UpdatePriority(ctx context.Context, req *api.UpdatePriorityRequest) (*api.Priority, error)

UpdatePriority handles the gRPC request to update an existing priority.

type SLAConditionHandler

type SLAConditionHandler interface {
	CreateSLACondition(options.Creator, *model.SLACondition) (*model.SLACondition, error)
	UpdateSLACondition(options.Updator, *model.SLACondition) (*model.SLACondition, error)
	DeleteSLACondition(options.Deleter) (*model.SLACondition, error)
	ListSLAConditions(options.Searcher) ([]*model.SLACondition, error)
}

SLAConditionHandler defines the interface for managing SLA conditions.

type SLAConditionService

type SLAConditionService struct {
	cases.UnimplementedSLAConditionsServer
	// contains filtered or unexported fields
}

SLAConditionService implements the gRPC server for SLA conditions.

func NewSLAConditionService

func NewSLAConditionService(app SLAConditionHandler) (*SLAConditionService, error)

NewSLAConditionService constructs a new SLAConditionService.

func (*SLAConditionService) CreateSLACondition

CreateSLACondition handles the gRPC request to create a new SLA condition. It validates the request, creates a new SLACondition model, and calls the handler's CreateSLACondition method.

func (*SLAConditionService) DeleteSLACondition

DeleteSLACondition handles the gRPC request to delete an SLA condition. It validates the request and calls the handler's DeleteSLACondition method.

func (*SLAConditionService) ListSLAConditions

ListSLAConditions handles the gRPC request to list SLA conditions with filters and pagination. It constructs search options based on the request and calls the handler's ListSLAConditions method.

func (*SLAConditionService) LocateSLACondition

LocateSLACondition finds an SLA condition by ID and returns it, or an error if not found. It uses the ListSLAConditions method to retrieve the SLA condition.

func (*SLAConditionService) Marshal

Marshal converts a model.SLACondition to its gRPC representation.

func (*SLAConditionService) UpdateSLACondition

UpdateSLACondition handles the gRPC request to update an existing SLA condition. It validates the request, constructs an SLACondition model, and calls the handler's UpdateSLACondition method.

type SLAHandler

type SLAHandler interface {
	ListSLAs(options.Searcher) ([]*model.SLA, error)
	CreateSLA(options.Creator, *model.SLA) (*model.SLA, error)
	UpdateSLA(options.Updator, *model.SLA) (*model.SLA, error)
	DeleteSLA(options.Deleter) (*model.SLA, error)
}

SLAHandler defines the interface for managing SLAs.

type SLAService

type SLAService struct {
	cases.UnimplementedSLAsServer
	// contains filtered or unexported fields
}

SLAService implements the gRPC server for SLAs.

func NewSLAService

func NewSLAService(app SLAHandler) (*SLAService, error)

NewSLAService constructs a new SLAService.

func (*SLAService) CreateSLA

func (s *SLAService) CreateSLA(
	ctx context.Context,
	req *cases.CreateSLARequest,
) (*cases.SLA, error)

CreateSLA handles the gRPC request to create a new SLA.

func (*SLAService) DeleteSLA

func (s *SLAService) DeleteSLA(
	ctx context.Context,
	req *cases.DeleteSLARequest,
) (*cases.SLA, error)

DeleteSLA handles the gRPC request to delete an SLA.

func (*SLAService) ListSLAs

func (s *SLAService) ListSLAs(
	ctx context.Context,
	req *cases.ListSLARequest,
) (*cases.SLAList, error)

ListSLAs handles the gRPC request to list SLAs with filters and pagination.

func (*SLAService) LocateSLA

LocateSLA finds an SLA by ID and returns it, or an error if not found or ambiguous.

func (*SLAService) Marshal

func (s *SLAService) Marshal(in *model.SLA) (*cases.SLA, error)

Marshal converts a model.SLA to its gRPC representation.

func (*SLAService) UpdateSLA

func (s *SLAService) UpdateSLA(
	ctx context.Context,
	req *cases.UpdateSLARequest,
) (*cases.SLA, error)

UpdateSLA handles the gRPC request to update an existing SLA.

type ServiceHandler

type ServiceHandler interface {
	CreateService(options.Creator, *model.Service) (*model.Service, error)
	ListServices(options.Searcher) ([]*model.Service, error)
	UpdateService(options.Updator, *model.Service) (*model.Service, error)
	DeleteService(options.Deleter) (*model.Service, error)
}

type ServiceService

type ServiceService struct {
	api.UnimplementedServicesServer
	// contains filtered or unexported fields
}

func NewServiceService

func NewServiceService(app ServiceHandler) (*ServiceService, error)

NewServiceService creates a new ServiceService.

func (*ServiceService) CreateService

func (s *ServiceService) CreateService(ctx context.Context, req *api.CreateServiceRequest) (*api.Service, error)

CreateService implements cases.ServicesServer.

func (*ServiceService) DeleteService

func (s *ServiceService) DeleteService(ctx context.Context, req *api.DeleteServiceRequest) (*api.ServiceList, error)

DeleteService implements cases.ServicesServer.

func (*ServiceService) ListServices

func (s *ServiceService) ListServices(ctx context.Context, req *api.ListServiceRequest) (*api.ServiceList, error)

ListServices implements cases.ServicesServer.

func (*ServiceService) LocateService

LocateService implements cases.ServicesServer.

func (*ServiceService) Marshal

func (s *ServiceService) Marshal(in *model.Service) (*api.Service, error)

func (*ServiceService) UpdateService

func (s *ServiceService) UpdateService(ctx context.Context, req *api.UpdateServiceRequest) (*api.Service, error)

UpdateService implements cases.ServicesServer.

type SourceHandler

type SourceHandler interface {
	CreateSource(options.Creator, *model.Source) (*model.Source, error)
	UpdateSource(options.Updator, *model.Source) (*model.Source, error)
	DeleteSource(options.Deleter) (*model.Source, error)
	ListSources(options.Searcher) ([]*model.Source, error)
}

SourceHandler defines the interface for managing sources.

type SourceService

type SourceService struct {
	_go.UnimplementedSourcesServer
	// contains filtered or unexported fields
}

SourceService implements the gRPC server for sources.

func NewSourceService

func NewSourceService(app SourceHandler) (*SourceService, error)

NewSourceService constructs a new SourceService.

func (*SourceService) CreateSource

func (s *SourceService) CreateSource(
	ctx context.Context,
	req *_go.CreateSourceRequest,
) (*_go.Source, error)

CreateSource handles the gRPC request to create a new source.

func (*SourceService) DeleteSource

func (s *SourceService) DeleteSource(
	ctx context.Context,
	req *_go.DeleteSourceRequest,
) (*_go.Source, error)

DeleteSource handles the gRPC request to delete a source.

func (*SourceService) ListSources

func (s *SourceService) ListSources(
	ctx context.Context,
	req *_go.ListSourceRequest,
) (*_go.SourceList, error)

ListSources handles the gRPC request to list sources with filters and pagination.

func (*SourceService) LocateSource

LocateSource finds a source by ID and returns it, or an error if not found or ambiguous.

func (*SourceService) Marshal

func (s *SourceService) Marshal(in *model.Source) (*_go.Source, error)

Marshal converts a model.Source to its gRPC representation.

func (*SourceService) UpdateSource

func (s *SourceService) UpdateSource(
	ctx context.Context,
	req *_go.UpdateSourceRequest,
) (*_go.Source, error)

UpdateSource handles the gRPC request to update an existing source.

type StatusConditionHandler

type StatusConditionHandler interface {
	ListStatusConditions(options.Searcher) ([]*model.StatusCondition, error)
	LocateStatusCondition(options.Searcher) (*model.StatusCondition, error)
	CreateStatusCondition(options.Creator, *model.StatusCondition) (*model.StatusCondition, error)
	UpdateStatusCondition(options.Updator, *model.StatusCondition) (*model.StatusCondition, error)
	DeleteStatusCondition(options.Deleter) (*model.StatusCondition, error)
}

StatusConditionHandler defines the interface for managing status conditions.

type StatusConditionService

type StatusConditionService struct {
	_go.UnimplementedStatusConditionsServer
	// contains filtered or unexported fields
}

StatusConditionService implements the gRPC server for status conditions.

func NewStatusConditionService

func NewStatusConditionService(app StatusConditionHandler) (*StatusConditionService, error)

NewStatusConditionService constructs a new StatusConditionService.

func (*StatusConditionService) CreateStatusCondition

CreateStatusCondition handles the gRPC request to create a new status condition.

func (*StatusConditionService) DeleteStatusCondition

DeleteStatusCondition handles the gRPC request to delete a status condition.

func (*StatusConditionService) ListStatusConditions

ListStatusConditions handles the gRPC request to list status conditions with filters and pagination.

func (*StatusConditionService) LocateStatusCondition

LocateStatusCondition finds a status condition by ID and returns it, or an error if not found or ambiguous.

func (*StatusConditionService) Marshal

Marshal converts a model.StatusCondition to its gRPC representation.

func (*StatusConditionService) UpdateStatusCondition

UpdateStatusCondition handles the gRPC request to update an existing status condition.

type StatusHandler

type StatusHandler interface {
	ListStatus(options.Searcher) ([]*model.Status, error)
	CreateStatus(options.Creator, *model.Status) (*model.Status, error)
	UpdateStatus(options.Updator, *model.Status) (*model.Status, error)
	DeleteStatus(options.Deleter) (*model.Status, error)
}

StatusHandler defines the interface for managing statuses.

type StatusService

type StatusService struct {
	_go.UnimplementedStatusesServer
	// contains filtered or unexported fields
}

StatusService implements the gRPC server for statuses.

func NewStatusService

func NewStatusService(app StatusHandler) (*StatusService, error)

NewStatusService constructs a new StatusService.

func (*StatusService) CreateStatus

func (s *StatusService) CreateStatus(ctx context.Context, req *_go.CreateStatusRequest) (*_go.Status, error)

CreateStatus handles the gRPC request to create a new status.

func (*StatusService) DeleteStatus

func (s *StatusService) DeleteStatus(ctx context.Context, req *_go.DeleteStatusRequest) (*_go.Status, error)

DeleteStatus handles the gRPC request to delete a status.

func (*StatusService) ListStatuses

func (s *StatusService) ListStatuses(ctx context.Context, req *_go.ListStatusRequest) (*_go.StatusList, error)

ListStatuses handles the gRPC request to list statuses with filters and pagination.

func (*StatusService) LocateStatus

LocateStatus finds a status by ID and returns it, or an error if not found or ambiguous.

func (*StatusService) Marshal

func (s *StatusService) Marshal(input *model.Status) (*_go.Status, error)

Marshal converts a model.Status to its gRPC representation.

func (*StatusService) UpdateStatus

func (s *StatusService) UpdateStatus(ctx context.Context, req *_go.UpdateStatusRequest) (*_go.Status, error)

UpdateStatus handles the gRPC request to update an existing status.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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