Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( S3_REGION = env.String("WORMHOL_S3_REGION", "", env.Required) S3_ACCESS_KEY_ID = env.String("WORMHOL_S3_ACCESS_KEY_ID", "", env.Required) S3_SECRET_ACCESS_KEY = env.String("WORMHOL_S3_SECRET_ACCESS_KEY", "", env.Required) S3_BUCKET = env.String("WORMHOL_S3_BUCKET", "", env.Required) S3_ACL = env.String("WORMHOL_S3_ACL", s3.ObjectCannedACLPrivate, env.Optional) S3_SSE = env.String("WORMHOL_S3_SSE", s3.ServerSideEncryptionAes256, env.Optional) S3_STORAGE_CLASS = env.String("WORMHOL_S3_STORAGE_CLASS", s3.ObjectStorageClassStandard, env.Optional) S3_LIST_OBJECTS_MAX_KEYS = int64(env.Int("WORMHOL_S3_LIST_OBJECTS_MAX_KEYS", 1000, env.Optional)) CLOUDFLARE_ZONE = env.String("WORMHOL_CLOUDFLARE_ZONE", "", env.Optional) CLOUDFLARE_ZONE_ID = env.String("WORMHOL_CLOUDFLARE_ZONE_ID", "", env.Optional) CLOUDFLARE_HOST = env.String("WORMHOL_CLOUDFLARE_HOST", "", env.Optional) CLOUDFLARE_EMAIL = env.String("WORMHOL_CLOUDFLARE_EMAIL", "", env.Optional) CLOUDFLARE_KEY = env.String("WORMHOL_CLOUDFLARE_KEY", "", env.Optional) CLOUDFLARE_TOKEN = env.String("WORMHOL_CLOUDFLARE_TOKEN", "", env.Optional) CLOUDFLARE_USER_SERVICE_KEY = env.String("WORMHOL_CLOUDFLARE_USER_SERVICE_KEY", "", env.Optional) OBJECT_KEY_BASE = env.String("WORMHOL_OBJECT_KEY_BASE", "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", env.Optional) OBJECT_KEY_LENGTH = env.Int("WORMHOL_OBJECT_KEY_LENGTH", 4, env.Optional) OBJECT_KEY_DELAY_MAX = time.Duration(env.Int("WORMHOL_OBJECT_KEY_DELAY_MAX_SECONDS", 5, env.Optional)) * time.Second OBJECT_NAME_LENGTH_MIN = env.Int("WORMHOL_OBJECT_NAME_LENGTH_MIN", 1, env.Optional) OBJECT_NAME_LENGTH_MAX = env.Int("WORMHOL_OBJECT_NAME_LENGTH_MAX", 255, env.Optional) OBJECT_SIZE_MIN = int64(env.Int("WORMHOL_OBJECT_SIZE_MIN_BYTES", 0, env.Optional)) OBJECT_SIZE_MAX = int64(env.Int("WORMHOL_OBJECT_SIZE_MAX_BYTES", 5*1000000000, env.Optional)) OBJECT_TIME_TO_LIVE = time.Duration(env.Int("WORMHOL_OBJECT_TIME_TO_LIVE_SECONDS", 60*60*24*3-1, env.Optional)) * time.Second )
Functions ¶
Types ¶
type Object ¶
type Object struct { Key string `json:"key"` Name string `json:"name"` SizeBytes int64 `json:"size"` LastModified time.Time `json:"last_modified"` ExpirationSeconds int64 `json:"expiration"` PresignedGetUrl string `json:"presigned_get_url"` PresignedPutUrl string `json:"presigned_put_url"` PresignedPutHeaders map[string]string `json:"presigned_put_headers"` }
Click to show internal directories.
Click to hide internal directories.