common

package
v0.0.0-...-b9360c4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FkDataBinaryContentType    = "application/vnd.fk.data+binary"
	FkDataBase64ContentType    = "application/vnd.fk.data+base64"
	MultiPartFormDataMediaType = "multipart/form-data"
	ContentTypeHeaderName      = "Content-Type"
	ContentLengthHeaderName    = "Content-Length"
	XForwardedForHeaderName    = "X-Forwarded-For"
	FkDeviceIdHeaderName       = "Fk-DeviceId"
	FkDeviceNameHeaderName     = "Fk-DeviceName"
	FkGenerationHeaderName     = "Fk-Generation"
	FkBlocksHeaderName         = "Fk-Blocks"
	FkFlagsIdHeaderName        = "Fk-Flags"
	FkTypeHeaderName           = "Fk-Type"

	// Deprecated
	FkFileIdHeaderName      = "Fk-FileId"
	FkVersionHeaderName     = "Fk-Version"
	FkFileNameHeaderName    = "Fk-FileName"
	FkFileVersionHeaderName = "Fk-FileVersion"
	FkBuildHeaderName       = "Fk-Build"
	FkFileOffsetHeaderName  = "Fk-FileOffset"
	FkCompiledHeaderName    = "Fk-Compiled"
	FkUploadNameHeaderName  = "Fk-UploadName"
)

Variables

This section is empty.

Functions

func SanitizeMeta

func SanitizeMeta(m map[string]*string) map[string]*string

Types

type AuthAttempt

type AuthAttempt struct {
	Token        string
	Scheme       *security.JWTScheme
	Key          []byte
	Unauthorized GenerateError
	Forbidden    GenerateError
	NotFound     GenerateError
}

type Authenticator

type Authenticator func(context.Context, AuthAttempt) (context.Context, error)

type BucketAndKey

type BucketAndKey struct {
	Bucket string
	Key    string
}

func GetBucketAndKey

func GetBucketAndKey(s3Url string) (*BucketAndKey, error)

type GenerateError

type GenerateError func(string) error

type ServiceOptions

type ServiceOptions struct {
	DB           *sqlxcache.DB
	JWTHMACKey   []byte
	Authenticate Authenticator
	Publisher    jobs.MessagePublisher
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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