srv

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(cfg Config) error

Types

type Config

type Config struct {
	Addr     string
	Certfile string
	Keyfile  string
	Repo     ManifestRepository
}

func (*Config) Load

func (c *Config) Load()

type ManifestHandler

type ManifestHandler struct {
	ManifestRepository ManifestRepository
}

func (*ManifestHandler) GetAllManifestMetaData

func (h *ManifestHandler) GetAllManifestMetaData(w http.ResponseWriter, r *http.Request)

func (*ManifestHandler) GetManifest

func (h *ManifestHandler) GetManifest(w http.ResponseWriter, r *http.Request)

func (*ManifestHandler) GetManifestMetaData

func (h *ManifestHandler) GetManifestMetaData(w http.ResponseWriter, r *http.Request)

type ManifestRepository

type ManifestRepository interface {
	FindAllManifestMetaData() ([]manifiesta.Metadata, error)
	FindManifestMetaData(manifest string) (manifiesta.Metadata, bool, error)
	FindManifest(manifest string) (manifiesta.Manifest, bool, error)
}

ManifestRepostiory is the source of manifest data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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