config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetServerConfig

func SetServerConfig()

Types

type AuthenticationBackend

type AuthenticationBackend interface {
	GetUser(*http.Request) (string, cmd.APIErrorCode)
}

func SetAuthBackend

func SetAuthBackend(backend string) AuthenticationBackend

type CephBackend

type CephBackend struct {
}

func (CephBackend) GetUser

func (b CephBackend) GetUser(r *http.Request) (string, cmd.APIErrorCode)

type DummyBackend

type DummyBackend struct {
}

func (DummyBackend) GetUser

func (b DummyBackend) GetUser(r *http.Request) (string, cmd.APIErrorCode)

type ServerConfig

type ServerConfig struct {
	Region               string
	Host                 string
	AuthBackend          AuthenticationBackend
	Scheme               string
	EnableKaoliangCreate string
	EnableKaoliangCopy   string
	EnableKaoliangDelete string
	EnableElasticCreate  string
}

func GetServerConfig

func GetServerConfig() *ServerConfig

Jump to

Keyboard shortcuts

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