Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ACL is the option to set the ACL of the file. OptACL = "acl" // PublicRead is the option to set the ACL of the file to public read. ACLPublicRead = "public-read" // Private is the option to set the ACL of the file to private. ACLPrivate = "private" // ContentType is the option to set the content type of the file. OptContentType = "content-type" // Metadata is the option to set the metadata of the file. OptMetadata = "metadata" // OptPinata is the option to set the pinataOptions OptPinata = "pinataOptions" )
Options constants.
View Source
const ( // PinataCloud is the identifier of the Pinata Cloud storage PinataCloud = "pinata" // SimpleStorageService is the identifier of the S3 provider SimpleStorageService = "s3" // GoogleCloudStorage is the identifier of the Google Cloud Storage provider GoogleCloudStorage = "gcs" // WasabiCloudStorage is the identifier of the Wasabi Cloud Storage provider WasabiCloudStorage = "wasabi" )
Provider constants
View Source
const ( // ReqAuth is the authorization header identifier ReqAuth = "Authorization" // ReqBearer is the bearer token identifier ReqBearer = "Bearer %s" // ReqContentType is the content type header identifier ReqContentType = "Content-Type" // MethodGet is the HTTP method for GET requests. MethodGet = "GET" // MethodPost is the HTTP method for POST requests. MethodPost = "POST" // MethodPut is the HTTP method for PUT requests. MethodPut = "PUT" // MethodDelete is the HTTP method for DELETE requests. MethodDelete = "DELETE" )
Request constants
View Source
const ( // URLPinataPinFile is the endpoint for pinning files/folders to Pinata cloud. URLPinataPinFile = "https://api.pinata.cloud/pinning/pinFileToIPFS" // URLPinataPinJSON is the endpoint for pinning JSON objects to Pinata cloud. URLPinataPinJSON = "https://api.pinata.cloud/pinning/pinJSONToIPFS" // URLPinataPinCID is the endpoint for pinning CIDs to Pinata cloud. URLPinataPinCID = "https://api.pinata.cloud/pinning/pinByHash" // URLPinataAuth is the endpoint for testing authentication against provided Pinata credentials URLPinataAuth = "https://api.pinata.cloud/data/testAuthentication" // URLPinataGateway is the public gateway for Pinata cloud. URLPinataGateway = "https://gateway.pinata.cloud/ipfs/%v" // URLGoogleCloudStorage is the public gateway for Google Cloud Storage. URLGoogleCloudStorage = "https://storage.googleapis.com/%s/%s" // URLSimpleStorageService is the public gateway for Simple Storage Service. URLSimpleStorageService = "https://%s.s3.%s.amazonaws.com/%s" //URLWasabiCloudStorage is the public gateway for Wasabi Cloud Storage. URLWasabiCloudStorage = "https://%s.s3.%s.wasabisys.com/%s" // URLWasabiEndpoint is the endpoint for Wasabi Cloud Storage. URLWasabiEndpoint = "https://s3.%s.wasabisys.com" )
URL constants.
Variables ¶
View Source
var OptionsContextKey = "options"
OptionsContextKey is the context key for the options
View Source
var ProviderContextKey = "provider"
ProviderContextKey is the context key for the provider
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.