domain

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

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnexpectedError = 0
	UnAuthorized    = 1
	InvalidArgument = 2
	NotFound        = 3
)

Variables

This section is empty.

Functions

func Errorf

func Errorf(code ErrorCode, format string, a ...interface{}) error

Types

type AppInfo

type AppInfo struct {
	Version   string
	CommitSha string
	UpToDate  bool
}

type AppInfoCaller

type AppInfoCaller interface {
	Get(ctx context.Context, env string, appName string) (*AppInfo, error)
}

type BadgeService

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

func NewBadgeService

func NewBadgeService(c AppInfoCaller) BadgeService

func (*BadgeService) GetBadge

func (s *BadgeService) GetBadge(ctx context.Context, env string, appName string, wr io.Writer) error

type CodeError

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

func (*CodeError) Code

func (e *CodeError) Code() ErrorCode

func (*CodeError) Error

func (e *CodeError) Error() string

type Color

type Color string
const (
	Green  Color = "#97ca00"
	Red    Color = "#fe7d37"
	Yellow Color = "#dfb317"
)

type ErrorCode

type ErrorCode int8

func GetCodeFromError

func GetCodeFromError(err error) (ErrorCode, bool)

type TemplateValues

type TemplateValues struct {
	Color Color
	Env   string
	Tag   string
}

Jump to

Keyboard shortcuts

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