catalogue

package
v0.0.0-...-8aa8f09 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 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 Catalogue

type Catalogue interface {
	fmt.Stringer
	SetTeams([]Team)
	SyncWithFile(ctx context.Context, log *logrus.Entry, path string, interval time.Duration) error
	Teams() []Team
	TeamByServiceName(service string) []Team
	Team(id string) (Team, bool)
}

func New

func New() Catalogue

type Config

type Config struct {
	Teams []TeamConfig `yaml:"teams"`
}

type OnCall

type OnCall struct {
	ScheduleName string
	Vendor       string
}

type OnCallConfig

type OnCallConfig struct {
	ScheduleName string `yaml:"schedule_name"`
	Vendor       string `yaml:"vendor"`
}

type Service

type Service struct {
	Name             string
	Description      string
	Url              string
	DashboardUrl     string
	DocumentationUrl string
	SourceCodeUrl    string
	ImChannelUrl     string
}

type ServiceConfig

type ServiceConfig struct {
	Name             string `yaml:"name"`
	Description      string `yaml:"description"`
	Url              string `yaml:"url"`
	DashboardUrl     string `yaml:"dashboard_url"`
	DocumentationUrl string `yaml:"documentation_url"`
	SourceCodeUrl    string `yaml:"source_code_url"`
	ImChannelUrl     string `yaml:"im_channel_url"`
}

type Team

type Team struct {
	Id               string
	Name             string
	Email            string
	IMChannelURL     string
	DashboardURL     string
	DocumentationURL string
	Services         []Service
	OnCall           OnCall
}

func LoadFromFile

func LoadFromFile(path string) ([]Team, error)

type TeamConfig

type TeamConfig struct {
	Name             string          `yaml:"name"`
	Email            string          `yaml:"email,omitempty"`
	IMChannelURL     string          `yaml:"im_channel_url,omitempty"`
	DocumentationURL string          `yaml:"documentation_url,omitempty"`
	DashboardURL     string          `yaml:"dashboard_url,omitempty"`
	Services         []ServiceConfig `yaml:"managed_services"`
	OnCall           *OnCallConfig   `yaml:"on_call,omitempty"`
}

Jump to

Keyboard shortcuts

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