web

package
v0.0.0-...-f448fd0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const JWTWellKnown = "https://token.actions.githubusercontent.com/.well-known/openid-configuration"

Variables

View Source
var (
	ErrContentRange = errors.New("invalid content-range header")
)

Functions

func GetRouter

func GetRouter(metricsListenAddress string, webHandler Handlers, withMetrics bool) *gin.Engine

func GinLogger

func GinLogger() gin.HandlerFunc

func HealthCheckEndpoint

func HealthCheckEndpoint(c *gin.Context)

func LookupKey

func LookupKey(keyID string) (interface{}, error)

func PingEndpoint

func PingEndpoint(c *gin.Context)

func XForwardedProto

func XForwardedProto(defaultScheme string) gin.HandlerFunc

Types

type ContentRange

type ContentRange struct {
	Unit  string
	Start int
	End   int
	Size  int
}

func ParseContentRange

func ParseContentRange(value string) (ContentRange, error)

type FinishCacheRequest

type FinishCacheRequest struct {
	Size int64 `json:"size"`
}

type Handlers

type Handlers struct {
	Storage  storage.Backend
	Database database.Backend
	Debug    bool
}

func (*Handlers) ArchivePath

func (h *Handlers) ArchivePath(c *gin.Context)

func (*Handlers) AuthRequired

func (h *Handlers) AuthRequired() gin.HandlerFunc

func (*Handlers) FinishCache

func (h *Handlers) FinishCache(c *gin.Context)

func (*Handlers) SearchCache

func (h *Handlers) SearchCache(c *gin.Context)

func (*Handlers) StartCache

func (h *Handlers) StartCache(c *gin.Context)

func (*Handlers) UploadCache

func (h *Handlers) UploadCache(c *gin.Context)

type StartCacheRequest

type StartCacheRequest struct {
	Key     string `json:"key"`
	Version string `json:"version"`
}

type StartCacheResponse

type StartCacheResponse struct {
	CacheID int `json:"cacheId"`
}

type WellKnownData

type WellKnownData struct {
	SignatureTypes []string `json:"id_token_signing_alg_values_supported"`
	JWKSURI        string   `json:"jwks_uri"`
}

func GetWellKnownData

func GetWellKnownData() (WellKnownData, error)

Jump to

Keyboard shortcuts

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