server

package
v0.0.0-...-9e1cc8c Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const CappsPath = "/v1/capps"
View Source
const ChunksPath = "/v1/chunks"

Variables

This section is empty.

Functions

func NewBufReader

func NewBufReader(r io.Reader) *bufReader

Types

type CApp

type CApp struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type CAppArtifact

type CAppArtifact struct {
	Name string `path:"name" validate:"required"`
	// version + extension
	ArtifactName string `path:"filename" validate:"required"`
}

type CAppRequest

type CAppRequest struct {
	Name string `path:"name" validate:"required"`
	// version + extension
	ArtifactName string `path:"filename" validate:"required"`
}

type CAppsListResponse

type CAppsListResponse struct {
	Artifacts *[]pkg.CappInfo `json:"capps"`
}

type CAppsLocationResponse

type CAppsLocationResponse struct {
	Endpoint string `json:"endpoint"`
}

type FormatInfo

type FormatInfo struct {
	Type      string            `json:"type"`
	Url       string            `json:"url"`
	CreatedAt time.Time         `json:"created_at"`
	SizeBytes int64             `json:"size_bytes,omitempty"`
	ExtraInfo map[string]string `json:"extra_info,omitempty"`
}

type Router

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

func NewRouter

func NewRouter(config *rest.HttpConfig, storage pkg.Storage, chunker pkg.Chunker, storageTimeout time.Duration,
	orgName string, msgBus mb.MsgBusServiceClient) *Router

func (*Router) Run

func (r *Router) Run()

type VersionInfo

type VersionInfo struct {
	Version string       `json:"version"`
	Formats []FormatInfo `json:"formats"`
}

type VersionListRequest

type VersionListRequest struct {
	Name string `path:"name" validate:"required"`
}

type VersionListResponse

type VersionListResponse struct {
	Name     string         `json:"name"`
	Versions *[]VersionInfo `json:"artifacts"`
}

Jump to

Keyboard shortcuts

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