service

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Create

type Create struct {
	Id          string
	Name        string
	Description string
	Team        string
	Prefix      string
	ServiceType ServiceType
	Catalogue   string
	AsServer    bool
	AsApp       bool
}

type CreateTag

type CreateTag struct {
	Tid string
	Sid string
}

type Edit

type Edit struct {
	Name        *string
	Description *string
	ServiceType *ServiceType
	Catalogue   *string
}

type IServiceService

type IServiceService interface {
	universally.IServiceGet[Service]
	universally.IServiceDelete
	universally.IServiceCreate[Create]
	universally.IServiceEdit[Edit]
	ServiceCountByTeam(ctx context.Context, teamId ...string) (map[string]int64, error)
	AppCountByTeam(ctx context.Context, teamId ...string) (map[string]int64, error)
	SearchPublicServices(ctx context.Context, keyword string) ([]*Service, error)
	Check(ctx context.Context, id string, rule map[string]bool) (*Service, error)
	ServiceList(ctx context.Context, serviceIds ...string) ([]*Service, error)
	AppList(ctx context.Context, appIds ...string) ([]*Service, error)
}

type Service

type Service struct {
	Id          string
	Name        string
	Description string
	Team        string
	Prefix      string
	ServiceType ServiceType
	Catalogue   string
	AsServer    bool
	AsApp       bool
	CreateTime  time.Time
	UpdateTime  time.Time
}

func FromEntity

func FromEntity(e *service.Service) *Service

type ServiceType

type ServiceType string
const (
	InnerService   ServiceType = "inner"
	PublicService  ServiceType = "public"
	UnknownService ServiceType = "unknown"
)

func ToServiceType

func ToServiceType(s int) ServiceType

func (ServiceType) Int

func (s ServiceType) Int() int

func (ServiceType) String

func (s ServiceType) String() string

Jump to

Keyboard shortcuts

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