service

package
v0.0.0-...-91ee4e6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server             *config.Server
	General            *GeneralConfig
	MetaDataController *MetaDataControllerConfig
}

Config is a struct that holds the configuration for Service

type GeneralConfig

type GeneralConfig struct {
	BaseURL                      string
	JWTKey, JWTSigningMethod     string
	AuthenticationServiceBaseURL string
}

GeneralConfig contains configuration parameters for general parts of the service.

type MetaDataControllerConfig

type MetaDataControllerConfig struct {
	Type              string
	SimpleMetaDataDir string
	SimpleTempDir     string
}

MetaDataControllerConfig is a struct that holds configuration parameters for a metadata controller.

type Service

type Service struct {
	Config             *Config
	SDK                *sdk.SDK
	MetaDataController metadatacontroller.MetaDataController
}

Service implements server.Service and handle all requests to the server.

func New

func New(cfg *Config) (*Service, error)

New will instantiate and return a new Service that implements server.Service.

func (*Service) DeleteObject

func (s *Service) DeleteObject(w http.ResponseWriter, r *http.Request)

DeleteObject retrieves the information about an object.

func (*Service) Endpoints

func (s *Service) Endpoints() map[string]map[string]http.HandlerFunc

Endpoints is a listing of all endpoints available in the Service.

func (*Service) ExamineObject

func (s *Service) ExamineObject(w http.ResponseWriter, r *http.Request)

ExamineObject retrieves the information about an object.

func (*Service) Init

func (s *Service) Init(w http.ResponseWriter, r *http.Request)

Init retrieves the information about an object.

func (*Service) ListTree

func (s *Service) ListTree(w http.ResponseWriter, r *http.Request)

ListTree retrieves the information about an object.

func (*Service) Middleware

func (s *Service) Middleware(h http.Handler) http.Handler

Middleware provides an http.Handler hook wrapped around all requests. In this implementation, we authenticate the request.

func (*Service) MoveObject

func (s *Service) MoveObject(w http.ResponseWriter, r *http.Request)

MoveObject retrieves the information about an object.

func (*Service) Prefix

func (s *Service) Prefix() string

Prefix returns the string prefix used for all endpoints within this service.

Jump to

Keyboard shortcuts

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