globals

package
v0.0.0-...-4c8df91 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = plogger.NewLogger()
View Source
var NEXServer *nex.Server
View Source
var S3Client *s3.Client

Functions

func S3HeadRequest

func S3HeadRequest(bucket, key string) (*s3.HeadObjectOutput, error)

func S3ObjectSize

func S3ObjectSize(bucket, key string) (uint64, error)

Types

type PostObjectInput

type PostObjectInput struct {
	// Key name
	Key string

	// The name of the bucket to presign the post to
	Bucket string

	// Expiration -  The number of seconds the presigned post is valid for.
	ExpiresIn time.Duration

	// A list of conditions to include in the policy. Each element can be either a list or a structure.
	// For example:
	// [
	//      {"acl": "public-read"}, ["content-length-range", 2, 5], ["starts-with", "$success_action_redirect", ""]
	// ]
	Conditions []interface{}
}

type PresignClient

type PresignClient struct {
	// contains filtered or unexported fields
}
var S3PresignClient *PresignClient

func NewPresignClient

func NewPresignClient(cfg aws.Config) *PresignClient

func (*PresignClient) PresignPostObject

func (presignClient *PresignClient) PresignPostObject(input *PostObjectInput) (*PresignedPostObject, error)

type PresignedPostObject

type PresignedPostObject struct {
	URL           string `json:"url"`
	Key           string `json:"key"`
	Policy        string `json:"policy"`
	Credential    string `json:"credential"`
	SecurityToken string `json:"securityToken,omitempty"`
	Signature     string `json:"signature"`
	Date          string `json:"date"`
}

Jump to

Keyboard shortcuts

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