handlers

package
v0.0.0-...-f7d0ea7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AtomicUpdateHandler

func AtomicUpdateHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

AtomicUpdateHandler will accept multiple TUF files and ensure that the storage backend is atomically updated with all the new records.

func DeleteHandler

func DeleteHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

DeleteHandler deletes all data for a GUN. A 200 responses indicates success.

func GetHandler

func GetHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

GetHandler returns the json for a specified role and GUN.

func GetTimestampHandler

func GetTimestampHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

GetTimestampHandler returns a timestamp.json given a GUN

func GetTimestampKeyHandler

func GetTimestampKeyHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

GetTimestampKeyHandler returns a timestamp public key, creating a new key-pair it if it doesn't yet exist

func MainHandler

func MainHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) error

MainHandler is the default handler for the server

Types

type ErrBadHierarchy

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

ErrBadHierarchy represents a missing snapshot at this current time. When delegations are implemented it will also represent a missing delegation parent

func (ErrBadHierarchy) Error

func (err ErrBadHierarchy) Error() string

type ErrBadRoot

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

ErrBadRoot represents a failure validating the root

func (ErrBadRoot) Error

func (err ErrBadRoot) Error() string

type ErrBadSnapshot

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

ErrBadSnapshot represents a failure to validate the snapshot

func (ErrBadSnapshot) Error

func (err ErrBadSnapshot) Error() string

type ErrBadTargets

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

ErrBadTargets represents a failure to validate a targets (incl delegations)

func (ErrBadTargets) Error

func (err ErrBadTargets) Error() string

type ErrValidation

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

ErrValidation represents a general validation error

func (ErrValidation) Error

func (err ErrValidation) Error() string

Jump to

Keyboard shortcuts

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