pkg

package
v0.0.0-...-3d17a17 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLI struct {
	Log struct {
		Level string `short:"l" enum:"trace,debug,info,warn,error" default:"debug"`
		Type  string `enum:"json,console" default:"json"`
	} `embed:"" prefix:"log-"`

	Server struct {
		Token        string `short:"t" help:"API token to be used for authenthication." default:"ActIsAwesome" env:"TOKEN"`
		ArtifactPath string `short:"d" help:"The root directory where to store artifacts." default:"/tmp/artifacts" env:"ARTIFACT_PATH"`
		Bind         string `short:"b" help:"Host to listen on." default:"0.0.0.0:1234" env:"BIND"`
	} `embed:"" prefix:"server-" envprefix:"SERVER_"`
}

Functions

func BearerAuth

func BearerAuth(handler httprouter.Handle) httprouter.Handle

func Serve

func Serve(ctx context.Context) context.CancelFunc

func WithLogging

func WithLogging(handler httprouter.Handle) httprouter.Handle

Types

type ContainerItem

type ContainerItem struct {
	Path            string `json:"path"`
	ItemType        string `json:"itemType"`
	ContentLocation string `json:"contentLocation"`
}

type ContainerItemResponse

type ContainerItemResponse struct {
	Value []ContainerItem `json:"value"`
}

type FileContainerResourceURL

type FileContainerResourceURL struct {
	FileContainerResourceURL string `json:"fileContainerResourceUrl"`
}

type MkdirFS

type MkdirFS interface {
	fs.FS
	MkdirAll(path string, perm fs.FileMode) error
	Open(name string) (fs.File, error)
	OpenAtEnd(name string) (fs.File, error)
}

type MkdirFsImpl

type MkdirFsImpl struct {
	fs.FS
	// contains filtered or unexported fields
}

func (MkdirFsImpl) MkdirAll

func (fsys MkdirFsImpl) MkdirAll(path string, perm fs.FileMode) error

func (MkdirFsImpl) Open

func (fsys MkdirFsImpl) Open(name string) (fs.File, error)

func (MkdirFsImpl) OpenAtEnd

func (fsys MkdirFsImpl) OpenAtEnd(name string) (fs.File, error)

type NamedFileContainerResourceURL

type NamedFileContainerResourceURL struct {
	Name                     string `json:"name"`
	FileContainerResourceURL string `json:"fileContainerResourceUrl"`
}

type NamedFileContainerResourceURLResponse

type NamedFileContainerResourceURLResponse struct {
	Count int                             `json:"count"`
	Value []NamedFileContainerResourceURL `json:"value"`
}

type ResponseMessage

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

Jump to

Keyboard shortcuts

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