api

package
v1.2.2-0...-a7e234e Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorTypeNomadUpstream = "nomad_upstream"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

func NewError

func NewError(opts ...ErrorOption) *Error

func (*Error) Apply

func (err *Error) Apply(c *gin.Context, logger *zap.SugaredLogger)

type ErrorOption

type ErrorOption func(*Error)

func WithCode

func WithCode(code int) ErrorOption

func WithError

func WithError(err error) ErrorOption

func WithMessage

func WithMessage(msg string) ErrorOption

func WithType

func WithType(errType string) ErrorOption

type Job

type Job struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

type NomadJob

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

type Pipeline

type Pipeline struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type PipelineServer

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

func NewPipelineServer

func NewPipelineServer(logger *zap.SugaredLogger) (*PipelineServer, error)

func (*PipelineServer) NewHTTPServer

func (ps *PipelineServer) NewHTTPServer(addr string) *http.Server

Jump to

Keyboard shortcuts

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