server

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateDomainFailed   = status.New(codes.Internal, "Creation failed")
	ErrDeleteDomainFailed   = status.New(codes.Internal, "Deletion failed")
	ErrGenerationUUIDFailed = status.New(codes.Internal, "UUID creation failed")
	ErrListDomainsFailed    = status.New(codes.Internal, "List domains failed")
)
View Source
var (
	ErrFailedGetCA = errors.New("failed to get CA")
)

Functions

This section is empty.

Types

type API

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

API

func (*API) CreateDomain

func (a *API) CreateDomain(ctx context.Context, req *pb.CreateDomainRequest) (*pb.CreateDomainResponse, error)

func (*API) CreateRedirect

func (a *API) CreateRedirect(ctx context.Context, req *pb.CreateRedirectRequest) (*pb.CreateRedirectResponse, error)

func (*API) DeleteDomain

func (a *API) DeleteDomain(ctx context.Context, req *pb.DeleteDomainRequest) (*pb.DeleteDomainResponse, error)

func (*API) DeleteRedirect

func (a *API) DeleteRedirect(ctx context.Context, req *pb.DeleteDomainRequest) (*pb.DeleteDomainResponse, error)

func (*API) GetDomain

func (a *API) GetDomain(ctx context.Context, req *pb.GetDomainRequest) (*pb.GetDomainResponse, error)

func (*API) ListDomains

func (a *API) ListDomains(ctx context.Context, req *pb.ListDomainsRequest) (*pb.ListDomainsResponse, error)

type Listener

type Listener interface {
	// ServeHTTP is starting the HTTP listener
	ServeHTTP()
	// ServeHTTPS is starting the HTTPS listener
	ServeHTTPS()
	// ServeAPI is starting the API listener
	ServeAPI()
	// Wait is waiting for everything to end :-)
	Wait() error
}

Listener describes the interface to a server

func NewServer

func NewServer(ctx context.Context, cfg *config.Config, manager certs.Manager) Listener

type Server

type Server listener

Server represents a listener

func (*Server) ServeAPI

func (s *Server) ServeAPI()

func (*Server) ServeHTTP

func (s *Server) ServeHTTP()

func (*Server) ServeHTTPS

func (s *Server) ServeHTTPS()

func (*Server) Wait

func (s *Server) Wait() error

Jump to

Keyboard shortcuts

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