service

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	AuthCache *authcache.Cache
	BlobStore *core.BlobStore
}

Dependencies contain the built dependencies of the blobstore service.

type InvalidTokenCustomError added in v0.1.4

type InvalidTokenCustomError string

InvalidTokenCustomError denotes that an invalid token was submitted and special explanation is needed in the error string.

func NewInvalidTokenCustomError added in v0.1.4

func NewInvalidTokenCustomError(err string) *InvalidTokenCustomError

NewInvalidTokenCustomError creates a new InvalidTokenCustomError.

func (*InvalidTokenCustomError) Error added in v0.1.4

func (e *InvalidTokenCustomError) Error() string

type Server

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

Server the blobstore server

func New

func New(cfg *config.Config, sconf ServerStaticConf) (*Server, error)

New create a new server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implementation of the http.Handler interface

type ServerStaticConf

type ServerStaticConf struct {
	// ServerName the name of the server, servername in the JSON output.
	ServerName string
	// ServerVersion the version of the server, serverversion in the JSON output.
	ServerVersion string
	// ID The ID of the server. This is provided for backwards compatibility with Shock. Deprecated.
	// id in the JSON output
	ID string
	// ServerVersionCompat The version of the shock server for which this server provides some
	// level of compatibility. Deprecated. version in the JSON output
	ServerVersionCompat string
	// DeprecationWarning A deprecation warning for users regarding the ID and ServerVersionCompat
	// fields.
	DeprecationWarning string
	// GitCommit is the git commit from which the server was built.
	GitCommit string
	// HTTPTimeout is the timeout of the blobstore http.Server,
	// the minio http.Client, the AWS http.Client,
	// and the custom http.Client that pushes to S3
	HTTPTimeout time.Duration
}

ServerStaticConf Static configuration items for the Server.

type UnauthorizedCustomError added in v0.1.4

type UnauthorizedCustomError string

UnauthorizedCustomError denotes that an unauthorized operation was requested that needs special explanation in the error string.

func NewUnauthorizedCustomError added in v0.1.4

func NewUnauthorizedCustomError(err string) *UnauthorizedCustomError

NewUnauthorizedCustomError creates a new UnauthorizedCustomError.

func (*UnauthorizedCustomError) Error added in v0.1.4

func (e *UnauthorizedCustomError) Error() string

Jump to

Keyboard shortcuts

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