restapi

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server represent a rest server

func New

func New(repo configrepo.Repo, address string, securityEnabled bool) *Server

New instantiate a REST server

func (*Server) CheckToken

func (s *Server) CheckToken(ctx iris.Context, app *configrepo.ApplicationVersion) error

CheckToken check if a valid auth token is present on the request

http headers: Authorization and X-Config-Token

func (*Server) IsSecurityEnabled

func (s *Server) IsSecurityEnabled() bool

IsSecurityEnabled returns if the security is enabled or not

func (*Server) StartNoTLS

func (s *Server) StartNoTLS() error

StartNoTLS starts a NON TLS listener

func (*Server) StartTLS

func (s *Server) StartTLS(certFile, keyFile string) error

StartTLS starts a TLS listener

func (*Server) Stop

func (s *Server) Stop()

Stop stops the REST listener

Jump to

Keyboard shortcuts

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