server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2014 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(log *logrus.Logger)

Main is the top of the pile. Start here.

func MigratorMain

func MigratorMain(log *logrus.Logger)

MigratorMain is the entry point for the "migrate" cli command

Types

type Options

type Options struct {
	AuthToken       string
	AutherType      string
	DatabaseURL     string
	FileStorePrefix string
	StorerType      string

	TravisAPIServer        string
	TravisPrivateKeyString string
	TravisRequireRSA       bool

	S3Bucket string
	S3Key    string
	S3Region string
	S3Secret string

	Debug bool
}

Options contains the bits used to create a server

func NewOptions

func NewOptions() *Options

NewOptions makes new *Options wheeee defaulting to an enterprise-friendly configuration.

func (*Options) String

func (o *Options) String() string

func (*Options) TravisPrivateKey

func (o *Options) TravisPrivateKey() *rsa.PrivateKey

TravisPrivateKey parses and returns an *rsa.PrivateKey from the TravisPrivateKeyString if present and valid

type Server

type Server struct {
	Router *mux.Router
	// contains filtered or unexported fields
}

Server holds onto a router and a store

func NewServer

func NewServer(opts *Options, log *logrus.Logger, md metadata.LookupSaver) (*Server, error)

NewServer creates a new *Server with a router and its routes registered

func (*Server) Run

func (srv *Server) Run(addr string)

Run starts up the server on the given addr

Jump to

Keyboard shortcuts

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