Documentation ¶
Index ¶
- Variables
- func GetUplinkProject(ctx context.Context) (*uplink.Project, bool)
- func NewSingleTenantGateway(log *zap.Logger, access *uplink.Access, config uplink.Config, ...) minio.Gateway
- func WithUplinkProject(ctx context.Context, project *uplink.Project) context.Context
- type Gateway
- type MinioConfig
- type S3CompatibilityConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrProjectUsageLimit is a custom error for when a user has reached their // Satellite project upload limit. // // Note: we went with 403 Forbidden over 507 Insufficient Storage, as 507 // doesn't fit this case exactly. 507 is for when the server cannot // physically store any further data, e.g. the disk has filled up. In this // case though the user can solve this themselves by upgrading their plan, // so it should be treated as a 4xx level error, not 5xx. ErrProjectUsageLimit = miniogo.ErrorResponse{ Code: "XStorjProjectLimits", StatusCode: http.StatusForbidden, Message: "You have reached your Storj project upload limit on the Satellite.", } // ErrSlowDown is a custom error for when a user is exceeding Satellite // request rate limits. We don't use the built-in `minio.SlowDown{}` error // because minio doesn't expect this error would be returned by the object // API. e.g. it would map errors like `minio.InsufficientWriteQuorum` to // `minio.SlowDown`, but not SlowDown to itself. ErrSlowDown = miniogo.ErrorResponse{ Code: "SlowDown", StatusCode: http.StatusTooManyRequests, Message: "Please reduce your request rate.", } // ErrNoUplinkProject is a custom error that indicates there was no // `*uplink.Project` in the context for the gateway to pick up. This error // may signal that passing credentials down to the object layer is working // incorrectly. ErrNoUplinkProject = errs.Class("uplink project") // ErrTooManyItemsToList indicates that ListObjects/ListObjectsV2 failed // because of too many items to list for gateway-side filtering using an // arbitrary delimiter and/or prefix. ErrTooManyItemsToList = minio.NotImplemented{ Message: "ListObjects(V2): listing too many items for gateway-side filtering using arbitrary delimiter/prefix", } )
Functions ¶
func GetUplinkProject ¶ added in v1.3.0
GetUplinkProject retrieves libuplink's *Project from ctx and reports whether it was successful.
Types ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
Gateway is the implementation of cmd.Gateway.
func NewStorjGateway ¶
func NewStorjGateway(compatibilityConfig S3CompatibilityConfig) *Gateway
NewStorjGateway creates a new Storj S3 gateway.
func (*Gateway) NewGatewayLayer ¶
func (gateway *Gateway) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, error)
NewGatewayLayer implements cmd.Gateway.
func (*Gateway) Production ¶
Production implements cmd.Gateway.
type MinioConfig ¶
type MinioConfig struct { AccessKey string `help:"Minio Access Key to use" default:"insecure-dev-access-key" basic-help:"true"` SecretKey string `help:"Minio Secret Key to use" default:"insecure-dev-secret-key" basic-help:"true"` Dir string `help:"Minio generic server config path" default:"$CONFDIR/minio"` }
MinioConfig is a configuration struct that keeps details about starting Minio.
type S3CompatibilityConfig ¶ added in v1.3.0
type S3CompatibilityConfig struct { IncludeCustomMetadataListing bool `help:"include custom metadata in S3's ListObjects, ListObjectsV2 and ListMultipartUploads responses" default:"true"` MaxKeysLimit int `help:"MaxKeys parameter limit for S3's ListObjects and ListObjectsV2 responses" default:"1000"` MaxKeysExhaustiveLimit int `help:"maximum number of items to list for gateway-side filtering using arbitrary delimiter/prefix" default:"100000"` FullyCompatibleListing bool `` /* 136-byte string literal not displayed */ DisableCopyObject bool `help:"return 501 (Not Implemented) for CopyObject calls" devDefault:"false" releaseDefault:"true"` MinPartSize int64 `help:"minimum part size for multipart uploads" default:"5242880"` // 5 MiB }
S3CompatibilityConfig is a configuration struct that determines details about how strict the gateway should be S3-compatible.
type ServerConfig ¶
type ServerConfig struct {
Address string `help:"address to serve S3 api over" default:"127.0.0.1:7777" basic-help:"true"`
}
ServerConfig determines how minio listens for requests.
Click to show internal directories.
Click to hide internal directories.