Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiKey ¶
type ApiKey struct { Id string `json:"Id"` FriendlyName string `json:"FriendlyName"` LastUsed int64 `json:"LastUsed"` LastUsedString string `json:"LastUsedString"` }
ApiKey contains data of a single api key
type AuthenticationConfig ¶
type AuthenticationConfig struct { Method int `json:"Method"` SaltAdmin string `json:"SaltAdmin"` SaltFiles string `json:"SaltFiles"` Username string `json:"Username"` Password string `json:"Password"` HeaderKey string `json:"HeaderKey"` OauthProvider string `json:"OauthProvider"` OAuthClientId string `json:"OAuthClientId"` OAuthClientSecret string `json:"OAuthClientSecret"` HeaderUsers []string `json:"HeaderUsers"` OauthUsers []string `json:"OauthUsers"` }
AuthenticationConfig holds configuration on how to authenticate to Gokapi admin menu
type AwsConfig ¶
type AwsConfig struct { Bucket string `yaml:"Bucket"` Region string `yaml:"Region"` KeyId string `yaml:"KeyId"` KeySecret string `yaml:"KeySecret"` Endpoint string `yaml:"Endpoint"` }
AwsConfig contains all configuration values / credentials for AWS cloud storage
func (*AwsConfig) IsAllProvided ¶
IsAllProvided returns true if all required variables have been set for using AWS S3 / Backblaze
type Configuration ¶
type Configuration struct { Authentication AuthenticationConfig `json:"Authentication"` Port string `json:"Port"` ServerUrl string `json:"ServerUrl"` RedirectUrl string `json:"RedirectUrl"` ConfigVersion int `json:"ConfigVersion"` LengthId int `json:"LengthId"` DataDir string `json:"DataDir"` MaxMemory int `json:"MaxMemory"` UseSsl bool `json:"UseSsl"` MaxFileSizeMB int `json:"MaxFileSizeMB"` Encryption Encryption `json:"Encryption"` }
Configuration is a struct that contains the global configuration
func (Configuration) ToJson ¶
func (c Configuration) ToJson() []byte
ToJson returns an idented JSon representation
func (Configuration) ToString ¶
func (c Configuration) ToString() string
ToString returns the object as an unidented Json string used for test units
type DownloadStatus ¶
DownloadStatus contains current downloads, so they do not get removed during cleanup
type Encryption ¶
type EncryptionInfo ¶
type File ¶
type File struct { Id string `json:"Id"` Name string `json:"Name"` Size string `json:"Size"` SHA256 string `json:"SHA256"` ExpireAt int64 `json:"ExpireAt"` ExpireAtString string `json:"ExpireAtString"` DownloadsRemaining int `json:"DownloadsRemaining"` PasswordHash string `json:"PasswordHash"` HotlinkId string `json:"HotlinkId"` ContentType string `json:"ContentType"` AwsBucket string `json:"AwsBucket"` Encryption EncryptionInfo `json:"Encryption"` UnlimitedDownloads bool `json:"UnlimitedDownloads"` UnlimitedTime bool `json:"UnlimitedTime"` }
File is a struct used for saving information about an uploaded file
func (*File) ToJsonResult ¶
ToJsonResult converts the file info to a json String used for returning a result for an upload
type LastUploadValues ¶
type Result ¶
type Result struct { Result string `json:"Result"` FileInfo *File `json:"FileInfo"` Url string `json:"Url"` HotlinkUrl string `json:"HotlinkUrl"` }
Result is the struct used for the result after an upload swagger:model UploadResult