v1

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

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

func New

func New(logger *logrus.Entry, sessionStore sessions.Store, eventStore storage.Storage, cat catalogue.Catalogue, onCall oncall.Manager) *Api

func (*Api) GetEvent

func (a *Api) GetEvent(w http.ResponseWriter, r *http.Request)

func (*Api) GetEventComments

func (a *Api) GetEventComments(w http.ResponseWriter, r *http.Request)

func (*Api) GetEvents

func (a *Api) GetEvents(w http.ResponseWriter, r *http.Request)

func (*Api) GetTeam

func (a *Api) GetTeam(w http.ResponseWriter, r *http.Request)

func (*Api) GetTeams

func (a *Api) GetTeams(w http.ResponseWriter, r *http.Request)

func (*Api) PostEvent

func (a *Api) PostEvent(w http.ResponseWriter, r *http.Request)

func (*Api) PostEventComment

func (a *Api) PostEventComment(w http.ResponseWriter, r *http.Request)

func (Api) Register

func (a Api) Register(router *mux.Router)

type Event

type Event struct {
	Id                string    `json:"id" validate:"isdefault"`
	State             string    `json:"state" validate:"isdefault"`
	Type              string    `json:"type"  validate:"required"`
	Service           string    `json:"service"`
	Title             string    `json:"title" validate:"required"`
	Start             time.Time `json:"start"`
	End               time.Time `json:"end"`
	Description       string    `json:"description"`
	Labels            []string  `json:"labels"`
	ResponsiblePerson User      `json:"responsible_person" validate:"-"`
	NumberOfComments  int       `json:"number_of_comments" validate:"isdefault"`
}

type EventComment

type EventComment struct {
	Author User   `json:"author" validate:"-"`
	Text   string `json:"text" validate:"required"`
}

type OnCall

type OnCall struct {
	Vendor       string   `json:"vendor"`
	ScheduleName string   `json:"schedule_name"`
	Person       []Person `json:"person"`
}

type Person

type Person struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Phone string `json:"phone"`
}

type Service

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

type Team

type Team struct {
	Id               string    `json:"id"`
	Name             string    `json:"name"`
	Email            string    `json:"email"`
	IMChannelURL     string    `json:"im_channel_url"`
	DashboardURL     string    `json:"dashboard_url"`
	DocumentationURL string    `json:"documentation_url"`
	Services         []Service `json:"managed_services"`
	OnCall           OnCall    `json:"on_call"`
}

type User

type User struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	AvatarUrl string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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