model

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorCode added in v0.4.0

func ErrorCode(err error) int

ErrorCode maps all Houston errors to unique codes for easy identification

Types

type BadCredentialsError

type BadCredentialsError struct{}

func (*BadCredentialsError) Error

func (m *BadCredentialsError) Error() string

type Error

type Error struct {
	Type    string `json:"type"`
	Message string `json:"message"`
	Code    int    `json:"code"`
}

type InternalError added in v0.4.0

type InternalError struct{}

func (*InternalError) Error added in v0.4.0

func (m *InternalError) Error() string

type Key

type Key struct {
	Id    string `json:"id"`
	Name  string `json:"name" key:"n"`
	Usage string `json:"usage" key:"u"`
}

type KeyNotFoundError

type KeyNotFoundError struct{}

func (*KeyNotFoundError) Error

func (m *KeyNotFoundError) Error() string

type KeyNotProvidedError

type KeyNotProvidedError struct{}

func (*KeyNotProvidedError) Error

func (m *KeyNotProvidedError) Error() string

type Mission

type Mission mission.Mission

Mission is returned by GET /missions/{id} and should only be used for checking mission status

type MissionCreateRequest

type MissionCreateRequest struct {
	Plan   string                 `json:"plan"`
	Id     string                 `json:"id"`
	Params map[string]interface{} `json:"params"` // TODO: update plan params with mission params
}

type MissionCreatedResponse

type MissionCreatedResponse struct {
	Id string `json:"id"`
}

type MissionStage

type MissionStage mission.Stage

type MissionStageStateUpdate

type MissionStageStateUpdate struct {
	State              string `json:"state"`
	IgnoreDependencies bool   `json:"ignoreDependencies"`
}

type MissionStageStateUpdateResponse

type MissionStageStateUpdateResponse mission.Response

type Plan

type Plan struct {
	Name     string                 `json:"name" key:"n"`
	Services []Service              `json:"services" key:"a"`
	Stages   []*Stage               `json:"stages" key:"s"`
	Params   map[string]interface{} `json:"params" key:"p"`
}

type PlanNotFoundError

type PlanNotFoundError struct {
	PlanName string
}

func (*PlanNotFoundError) Error

func (m *PlanNotFoundError) Error() string

type Service

type Service struct {
	Name    string                 `json:"name"`
	Trigger map[string]interface{} `json:"trigger"`
}

type Stage

type Stage struct {
	Name       string                 `json:"name" key:"n"`
	Service    string                 `json:"service" key:"a"`
	Upstream   []string               `json:"upstream" key:"u"`
	Downstream []string               `json:"downstream" key:"d"`
	Params     map[string]interface{} `json:"params" key:"p"`
}

type Success

type Success struct {
	Message string `json:"message"`
}

type TooManyRequestsError

type TooManyRequestsError struct{}

func (*TooManyRequestsError) Error

func (m *TooManyRequestsError) Error() string

type TransactionFailedError

type TransactionFailedError struct{}

func (*TransactionFailedError) Error

func (m *TransactionFailedError) Error() string

Jump to

Keyboard shortcuts

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