Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Authorization authhandler.Config // Version is the version of the DCAS endpoint Version string // BasePath is the base context path of the REST endpoint BasePath string // ChaincodeName is the name of the chaincode that stores the content ChaincodeName string // Collection is the name of the DCAS collection that stores the content Collection string }
Config defines the configuration for a DCAS handler
type ResultCode ¶
type ResultCode = string
ResultCode specifies the status string of a read result
const ( // CodeCasNotReachable indicates that there was an error when attempting to communicate with the CAS service CodeCasNotReachable ResultCode = "cas_not_reachable" // CodeInvalidHash indicates that the hash was not specified or is invalid CodeInvalidHash ResultCode = "content_hash_invalid" // CodeMaxSizeExceeded indicates that the resulting content exceeds the maximum size specified in the request CodeMaxSizeExceeded ResultCode = "content_exceeds_maximum_allowed_size" // CodeMaxSizeNotSpecified indicates that the max-size parameter was not specified in the request CodeMaxSizeNotSpecified ResultCode = "content_max_size_not_specified" // CodeNotFound indicates that the content for the given hash was not found CodeNotFound ResultCode = "content_not_found" )
type Retrieve ¶
type Retrieve struct { Config // contains filtered or unexported fields }
Retrieve manages file retrievals from the DCAS store
func NewRetrieveHandler ¶
NewRetrieveHandler returns a new Retrieve handler
func (*Retrieve) Handler ¶
func (h *Retrieve) Handler() common.HTTPRequestHandler
Handler returns the request handler
type Upload ¶
type Upload struct { Config // contains filtered or unexported fields }
Upload manages uploads to a DCAS store
func NewUploadHandler ¶
NewUploadHandler returns a new DCAS upload handler
func (*Upload) Handler ¶
func (h *Upload) Handler() common.HTTPRequestHandler
Handler returns the request handler
type UploadResponse ¶
type UploadResponse struct {
Hash string `json:"hash"`
}
UploadResponse contains the response from a CAS upload
type Version ¶
type Version struct {
*versionhandler.Version
}
Version handles version requests
func NewVersionHandler ¶
NewVersionHandler returns a new Version handler
Source Files ¶
Click to show internal directories.
Click to hide internal directories.