package server

import "github.com/theupdateframework/notary/server"

Index

Functions

func RootHandler

func RootHandler(ctx context.Context, ac auth.AccessController, trust signed.CryptoService,
	consistent, current utils.CacheControlConfig, repoPrefixes []string) http.Handler

RootHandler returns the handler that routes all the paths from / for the server.

func Run

func Run(ctx context.Context, conf Config) error

Run sets up and starts a TLS server that can be cancelled using the given configuration. The context it is passed is the context it should use directly for the TLS server, and generate children off for requests

Types

type Config

type Config struct {
	Addr                         string
	TLSConfig                    *tls.Config
	Trust                        signed.CryptoService
	AuthMethod                   string
	AuthOpts                     interface{}
	RepoPrefixes                 []string
	ConsistentCacheControlConfig utils.CacheControlConfig
	CurrentCacheControlConfig    utils.CacheControlConfig
}

Config tells Run how to configure a server

Source Files

server.go

Directories

PathSynopsis
server/errors
server/handlers
server/snapshot
server/storage
server/timestamp
Version
v0.4.4
Published
Jan 7, 2017
Platform
js/wasm
Imports
18 packages
Last checked
52 minutes ago

Tools for package owners.