server

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LatestReleasePath     = "/"
	PingPath              = "/ping"
	LatestReleaseNamePath = "/latest"
	ListReleaseNamesPath  = "/releases"
	ChecksumPath          = "/checksum"

	ReleaseNameArgPath = "/:release_name"
	OSArgPath          = "/:os"
	ArchArgPath        = "/:arch"

	Analytics = "analytics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ListReleaseNamesResponse added in v0.1.2

type ListReleaseNamesResponse struct {
	ReleaseNames []string `json:"release_names"`
}

type Server

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

func New

func New(github *github.Client, helper *cmdutils.Helper[*config.Config]) *Server

func (*Server) GetChecksum

func (s *Server) GetChecksum(ctx *fiber.Ctx) error

GetChecksum returns the checksum for the given release name, os, and arch

func (*Server) GetLatestReleaseName added in v0.1.2

func (s *Server) GetLatestReleaseName(ctx *fiber.Ctx) error

GetLatestReleaseName returns the name of the latest release

func (*Server) GetLatestReleaseShellScript added in v0.1.2

func (s *Server) GetLatestReleaseShellScript(ctx *fiber.Ctx) error

GetLatestReleaseShellScript returns a shell script which will download the latest release of the binary and install it on the system

func (*Server) GetPing

func (s *Server) GetPing(ctx *fiber.Ctx) error

GetPing is a simple health check endpoint that always returns 200

func (*Server) GetReleaseArtifact added in v0.1.2

func (s *Server) GetReleaseArtifact(ctx *fiber.Ctx) error

GetReleaseArtifact returns the artifact for the given release name, os, and arch

func (*Server) GetReleaseShellScript added in v0.1.2

func (s *Server) GetReleaseShellScript(ctx *fiber.Ctx) error

GetReleaseShellScript returns a shell script which will download the given release of the binary and install it on the system

func (*Server) ListReleaseNames added in v0.1.2

func (s *Server) ListReleaseNames(ctx *fiber.Ctx) error

ListReleaseNames returns a list of all available release names

func (*Server) Start

func (s *Server) Start(address string, config *tls.Config, tlsOverride bool) (err error)

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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