Documentation ¶
Index ¶
- func GetStandardsMap() map[string]func(Structure UploaderStructure) (*Uploader, error)
- func ShareXParamHandler(Data string, Filename string, Response string, ResponseURL string, ...) (string, error)
- func ShareXParamParse(Origin string, Filename string, Response string, ResponseURL string, ...) (string, error)
- type ConfigOption
- type DollarSyntaxMatch
- type FTPSpec
- type HTTPSpec
- type POSTAs
- type S3Spec
- type SXCUSpec
- type Uploader
- type UploaderStructure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStandardsMap ¶
func GetStandardsMap() map[string]func(Structure UploaderStructure) (*Uploader, error)
GetStandardsMap gets the standards map.
Types ¶
type ConfigOption ¶
type ConfigOption struct { Required *bool `json:"required"` Type string `json:"type"` Value string `json:"value"` Default *interface{} `json:"default"` }
ConfigOption defines a config option.
type DollarSyntaxMatch ¶
DollarSyntaxMatch is used to repersent a dollar syntax match.
func GetDollarSyntax ¶
func GetDollarSyntax(Origin string) *DollarSyntaxMatch
GetDollarSyntax is used to get dollar syntax in the string.
type FTPSpec ¶
type FTPSpec struct { Hostname string `json:"hostname"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` Directory string `json:"directory"` BaseURL string `json:"base_url"` }
FTPSpec defines the FTP spec for this uploader.
type HTTPSpec ¶
type HTTPSpec struct { Method string `json:"method"` URL string `json:"url"` POSTAs *POSTAs `json:"post_as"` Headers *map[string]string `json:"headers"` Response *string `json:"response"` }
HTTPSpec defines the HTTP spec for this uploader.
type S3Spec ¶
type S3Spec struct { AccessKeyID string `json:"access_key_id"` SecretAccessKey string `json:"secret_access_key"` Endpoint string `json:"endpoint"` BucketName string `json:"bucket_name"` BucketURL string `json:"bucket_url"` }
S3Spec defines the S3 spec for this uploader.
type SXCUSpec ¶
type SXCUSpec struct { DestinationType *string RequestMethod *string // Newer version of below. RequestType *string Body *string Parameters *map[string]string // Newer version of below. Arguments *map[string]string FileFormName *string // Needed for form request types. RequestURL string URL string Headers *map[string]string RegexList []string }
SXCUSpec defines the SXCU spec for this uploader.
type Uploader ¶
type Uploader struct { Icon string `json:"icon"` Description string `json:"description"` Name string `json:"name"` ConfigOptions map[string]ConfigOption `json:"configOptions"` Upload func(Config map[string]interface{}, Data []byte, Filename string) (string, error) `json:"-"` }
Uploader defines the uploader in its final form.
func FTPInit ¶
func FTPInit(Structure UploaderStructure) (*Uploader, error)
FTPInit defines the FTP standard.
func HTTPInit ¶
func HTTPInit(Structure UploaderStructure) (*Uploader, error)
HTTPInit defines the HTTP standard.
func S3Init ¶
func S3Init(Structure UploaderStructure) (*Uploader, error)
S3Init defines the S3 standard.
func SXCUInit ¶
func SXCUInit(Structure UploaderStructure) (*Uploader, error)
SXCUInit defines the SXCU standard.
type UploaderStructure ¶
type UploaderStructure struct { Icon string `json:"icon"` Name string `json:"name"` Description string `json:"description"` Config map[string]ConfigOption `json:"config"` Spec interface{} `json:"spec"` }
UploaderStructure defines the structure that an imported uploaders JSON will follow.