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 // BasePath is the base context path of the REST endpoint BasePath string // ChaincodeName is the name of the chaincode that stores the files ChaincodeName string // Collection is the name of the DCAS collection that stores the file Collection string // IndexNamespace is the namespace of the index Sidetree document IndexNamespace string // IndexDocID is ID of the Sidetree document that contains the index of all files stored in this path IndexDocID string }
Config defines the configuration for a file handler
type FileIndex ¶
type FileIndex struct { BasePath string `json:"basePath"` Mappings map[string]string `json:"mappings"` }
FileIndex contains the mappings of file name to ID
type FileIndexDoc ¶
type FileIndexDoc struct { ID string `json:"id"` UniqueSuffix string `json:"didUniqueSuffix"` FileIndex FileIndex `json:"fileIndex"` }
FileIndexDoc contains a file index document
type ResolveIndex ¶
type ResolveIndex struct { *dochandler.ResolveHandler // contains filtered or unexported fields }
ResolveIndex is a REST handler that retrieves a file index Sidetree documents by ID
func NewResolveIndexHandler ¶
func NewResolveIndexHandler(path string, resolver dochandler.Resolver) *ResolveIndex
NewResolveIndexHandler returns a new resolve index handler
func (*ResolveIndex) Handler ¶
func (h *ResolveIndex) Handler() common.HTTPRequestHandler
Handler returns the handler
type Retrieve ¶
type Retrieve struct { Config // contains filtered or unexported fields }
Retrieve manages file retrievals from a DCAS store
func NewRetrieveHandler ¶
func NewRetrieveHandler(channelID string, cfg Config, resolver documentResolver, dcasProvider dcasClientProvider) *Retrieve
NewRetrieveHandler returns a new file retrieve handler
func (*Retrieve) Handler ¶
func (h *Retrieve) Handler() common.HTTPRequestHandler
Handler returns the handler
type UpdateIndex ¶
type UpdateIndex struct { *resthandler.UpdateHandler // contains filtered or unexported fields }
UpdateIndex is a REST handler that creates/updates file index Sidetree documents
func NewUpdateIndexHandler ¶
func NewUpdateIndexHandler(path string, processor resthandler.Processor, pc protocol.Client) *UpdateIndex
NewUpdateIndexHandler returns a new update index handler
func (*UpdateIndex) Handler ¶
func (h *UpdateIndex) Handler() common.HTTPRequestHandler
Handler returns the handler
type Upload ¶
type Upload struct { Config // contains filtered or unexported fields }
Upload manages file uploads to a DCAS store
func NewUploadHandler ¶
NewUploadHandler returns a new file upload handler
func (*Upload) Handler ¶
func (h *Upload) Handler() common.HTTPRequestHandler
Handler returns the handler