Documentation ¶
Index ¶
- type Call
- type FileAddOpts
- type IndexResponse
- type LoginResponse
- type Response
- type SearchResponse
- type V2
- func (v2 *V2) FileAdd(filePath string, opts FileAddOpts) (string, error)
- func (v2 *V2) GetJWT() (string, error)
- func (v2 *V2) IndexHash(hash string, reindex bool) (string, error)
- func (v2 *V2) Login() error
- func (v2 *V2) PinAdd(hash, holdTime string) (string, error)
- func (v2 *V2) PinExtend(hash, holdTime string) (string, error)
- func (v2 *V2) SearchLens(query string) (*SearchResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call string
Call is a typed string representing an API call
const ( // DevURL is the api url for development temporal environment DevURL = "https://dev.api.temporal.cloud/v2" // ProdURL is the api url for production temporal environment ProdURL = "https://api.temporal.cloud/v2" // Login is the login api call Login Call = "/auth/login" // FileAddPublic is a file upload api call for public ipfs network FileAddPublic Call = "/ipfs/public/file/add" // PinAddPublic is a pin add api call for public ipfs network PinAddPublic Call = "/ipfs/public/pin/%s" // PinExtendPublic is used to extend pin durations PinExtendPublic Call = "/ipfs/public/pin/%s/extend" // LensIndex is used to index content against lens LensIndex Call = "/lens/index" // LensSearch is used to submit a search against the lens index LensSearch Call = "/lens/search" )
func (Call) FillParams ¶
FillParams is used to fill parameter placements for api calls
type FileAddOpts ¶
FileAddOpts are options used to configure file uploads
type IndexResponse ¶
type IndexResponse struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"` Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` }
IndexResponse is a response from a lens index call
type LoginResponse ¶
LoginResponse is a response from the login api call
type SearchResponse ¶
type V2 ¶
type V2 struct {
// contains filtered or unexported fields
}
V2 is our interface with temporal's v2 api
func (*V2) FileAdd ¶
func (v2 *V2) FileAdd(filePath string, opts FileAddOpts) (string, error)
FileAdd is used to add a file to ipfs it returns the hash of the file that was uploaded
func (*V2) SearchLens ¶
func (v2 *V2) SearchLens(query string) (*SearchResponse, error)
Click to show internal directories.
Click to hide internal directories.