Help us shape the future of Go! Take the 2026 Go Developer Survey

service

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateServicesDefinitions

func ValidateServicesDefinitions(servicesDir string) error

ValidateServicesDefinitions takes a root dir of services and inspect all services compose files

Types

type Arguments

type Arguments struct {
	Environments map[string]string `json:"environments"`
	Files        map[string]string `json:"files"`
}

type Badge

type Badge struct {
	Subject string `json:"subject"`
	Status  string `json:"status"`
	Color   string `json:"color"`
}

type Console added in v0.2.4

type Console struct {
}

func (*Console) Log added in v0.2.4

func (c *Console) Log(args ...interface{})

type FolderService

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

func NewFolder

func NewFolder(_path string) (*FolderService, error)

func (*FolderService) Badge

func (f *FolderService) Badge(project, branch, commit, badge string) (Badge, error)

func (*FolderService) Meta added in v0.2.4

func (f *FolderService) Meta() Meta

Meta data about this service

func (*FolderService) Name

func (f *FolderService) Name() string

func (*FolderService) New

func (f *FolderService) New(project string, args map[string]interface{}) (uuid.UUID, error)

func (*FolderService) Run

func (f *FolderService) Run(id uuid.UUID) error

func (*FolderService) Validate

func (f *FolderService) Validate(args map[string]interface{}) (Arguments, error)

type Meta added in v0.2.4

type Meta struct {
	Description       string `yaml:"description"`
	UserDockerCompose bool   `yaml:"user_docker_compose"`
}

Meta contains metadata about the linked service

type Service

type Service interface {
	// Validate the input coming from HTTP Body as a JSON, and fight against XSS
	//Validate is sync
	Validate(map[string]interface{}) (Arguments, error)
	// When the queue is ok, run async
	// Run can use the user's Sentry ID
	New(project string, args map[string]interface{}) (uuid.UUID, error)
	Run(id uuid.UUID) error

	// Build a Badge for a project/branch/commit and badge name
	Badge(project, branch, commit, badge string) (Badge, error)

	// TODO
	//Watch(id uuid.UUID) error
	// What's service name?
	Name() string
	Meta() Meta
}

Jump to

Keyboard shortcuts

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