service

package
v1.38.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CreateServiceEventName                    event.EventName = "CreateService"
	UpdateServiceEventName                    event.EventName = "UpdateService"
	DeleteServiceEventName                    event.EventName = "DeleteService"
	AddOwnerToServiceEventName                event.EventName = "AddOwnerToService"
	RemoveOwnerFromServiceEventName           event.EventName = "RemoveOwnerFromService"
	ListServicesEventName                     event.EventName = "ListServices"
	GetServiceEventName                       event.EventName = "GetService"
	ListServiceCcrnsEventName                 event.EventName = "ListServiceCcrns"
	ListServiceDomainsEventName               event.EventName = "ListServiceDomains"
	ListServiceRegionsEventName               event.EventName = "ListServiceRegions"
	AddIssueRepositoryToServiceEventName      event.EventName = "AddIssueRepositoryToService"
	RemoveIssueRepositoryFromServiceEventName event.EventName = "RemoveIssueRepositoryFromService"
)

Variables

View Source
var CacheTtlCountServices = 12 * time.Hour
View Source
var CacheTtlGetAllSericeCursors = 12 * time.Hour
View Source
var CacheTtlGetServiceAttrs = 12 * time.Hour
View Source
var CacheTtlGetServices = 12 * time.Hour
View Source
var CacheTtlGetServicesWithAggregations = 12 * time.Hour

Functions

func OnServiceCreate

func OnServiceCreate(db database.Database, e event.Event)

OnServiceCreate is a handler for the CreateServiceEvent Is creating a single default priority for the default issue repository

Types

type AddIssueRepositoryToServiceEvent

type AddIssueRepositoryToServiceEvent struct {
	ServiceID    int64
	RepositoryID int64
}

func (*AddIssueRepositoryToServiceEvent) Name

type AddOwnerToServiceEvent

type AddOwnerToServiceEvent struct {
	ServiceID int64
	OwnerID   int64
}

func (*AddOwnerToServiceEvent) Name

type CreateServiceEvent

type CreateServiceEvent struct {
	Service *entity.Service
}

func (*CreateServiceEvent) Name

type DeleteServiceEvent

type DeleteServiceEvent struct {
	ServiceID int64
}

func (*DeleteServiceEvent) Name

type GetServiceEvent

type GetServiceEvent struct {
	ServiceID int64
	Service   *entity.Service
}

func (*GetServiceEvent) Name

func (e *GetServiceEvent) Name() event.EventName

type ListServiceCcrnsEvent

type ListServiceCcrnsEvent struct {
	Filter  *entity.ServiceFilter
	Options *entity.ListOptions
	Ccrns   []string
}

func (*ListServiceCcrnsEvent) Name

type ListServiceDomainsEvent added in v1.23.0

type ListServiceDomainsEvent struct {
	Filter  *entity.ServiceFilter
	Options *entity.ListOptions
	Domains []string
}

func (*ListServiceDomainsEvent) Name added in v1.23.0

type ListServiceRegionsEvent added in v1.23.0

type ListServiceRegionsEvent struct {
	Filter  *entity.ServiceFilter
	Options *entity.ListOptions
	Regions []string
}

func (*ListServiceRegionsEvent) Name added in v1.23.0

type ListServicesEvent

type ListServicesEvent struct {
	Filter   *entity.ServiceFilter
	Options  *entity.ListOptions
	Services *entity.List[entity.ServiceResult]
}

func (*ListServicesEvent) Name

func (e *ListServicesEvent) Name() event.EventName

type RemoveIssueRepositoryFromServiceEvent

type RemoveIssueRepositoryFromServiceEvent struct {
	ServiceID    int64
	RepositoryID int64
}

func (*RemoveIssueRepositoryFromServiceEvent) Name

type RemoveOwnerFromServiceEvent

type RemoveOwnerFromServiceEvent struct {
	ServiceID int64
	OwnerID   int64
}

func (*RemoveOwnerFromServiceEvent) Name

type ServiceHandler

type ServiceHandler interface {
	GetService(serviceId int64) (*entity.Service, error)
	ListServices(filter *entity.ServiceFilter, options *entity.ListOptions) (*entity.List[entity.ServiceResult], error)
	CreateService(ctx context.Context, service *entity.Service) (*entity.Service, error)
	UpdateService(ctx context.Context, service *entity.Service) (*entity.Service, error)
	DeleteService(ctx context.Context, id int64) error
	AddOwnerToService(serviceId, ownerId int64) (*entity.Service, error)
	RemoveOwnerFromService(serviceId, ownerId int64) (*entity.Service, error)
	ListServiceCcrns(filter *entity.ServiceFilter, options *entity.ListOptions) ([]string, error)
	ListServiceDomains(filter *entity.ServiceFilter, options *entity.ListOptions) ([]string, error)
	ListServiceRegions(filter *entity.ServiceFilter, options *entity.ListOptions) ([]string, error)
	AddIssueRepositoryToService(int64, int64, int64) (*entity.Service, error)
	RemoveIssueRepositoryFromService(int64, int64) (*entity.Service, error)
}

func NewServiceHandler

func NewServiceHandler(handlerContext common.HandlerContext) ServiceHandler

type ServiceHandlerError

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

func NewServiceHandlerError

func NewServiceHandlerError(msg string) *ServiceHandlerError

func (*ServiceHandlerError) Error

func (e *ServiceHandlerError) Error() string

type UpdateServiceEvent

type UpdateServiceEvent struct {
	Service *entity.Service
}

func (*UpdateServiceEvent) Name

Jump to

Keyboard shortcuts

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