server

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImplementationAWS                = "AmazonS3"
	ImplementationMinio              = "MinIO"
	ImplementationGoogleCloudStorage = "UploadServer"
	ImplementationDigitalOceanSpaces = "DigitalOceanSpaces"
	ImplementationUnknown            = "Unknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List map[string]Server

List is a list of Servers

func NewList

func NewList(svrs []config.S3Server) List

NewList creates a new server list

func (List) Setup

func (sl List) Setup() error

Setup initialize all servers in the list

type Server

type Server struct {
	*s3.S3

	Config *config.S3Server
}

Server is a abstraction of an S3 server/bucket

func (*Server) DetectImplementation added in v0.4.0

func (s *Server) DetectImplementation() string

func (*Server) GetExpirationClass added in v0.3.0

func (s *Server) GetExpirationClass(cls string) *config.Expiration

GetExpirationClass gets the expiration class by name

func (*Server) GetObjectURL

func (s *Server) GetObjectURL(key string) *url.URL

GetObjectURL returns the full URL to an object based on its key

func (*Server) GetURL

func (s *Server) GetURL() *url.URL

GetURL returns the full endpoint URL of the S3 server

func (*Server) Healthy added in v0.5.0

func (s *Server) Healthy() bool

Healthy returns true if the S3 server is reachable and responds to our authenticated requests

func (*Server) Setup

func (s *Server) Setup() error

Setup initializes the S3 bucket (life-cycle rules & CORS)

Jump to

Keyboard shortcuts

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