Documentation ¶
Index ¶
- Variables
- type HighwayServer
- func (s *HighwayServer) CreateBucket(ctx context.Context, req *bt.MsgCreateBucket) (*bt.MsgCreateBucketResponse, error)
- func (s *HighwayServer) CreateBucketHTTP(c *gin.Context)
- func (s *HighwayServer) CreateChannel(ctx context.Context, req *ct.MsgCreateChannel) (*ct.MsgCreateChannelResponse, error)
- func (s *HighwayServer) CreateChannelHTTP(c *gin.Context)
- func (s *HighwayServer) CreateObject(ctx context.Context, req *ot.MsgCreateObject) (*ot.MsgCreateObjectResponse, error)
- func (s *HighwayServer) CreateObjectHTTP(c *gin.Context)
- func (s *HighwayServer) DeactivateBucket(ctx context.Context, req *bt.MsgDeactivateBucket) (*bt.MsgDeactivateBucketResponse, error)
- func (s *HighwayServer) DeactivateBucketHTTP(c *gin.Context)
- func (s *HighwayServer) DeactivateChannel(ctx context.Context, req *ct.MsgDeactivateChannel) (*ct.MsgDeactivateChannelResponse, error)
- func (s *HighwayServer) DeactivateChannelHTTP(c *gin.Context)
- func (s *HighwayServer) DeactivateObject(ctx context.Context, req *ot.MsgDeactivateObject) (*ot.MsgDeactivateObjectResponse, error)
- func (s *HighwayServer) DeactivateObjectlHTTP(c *gin.Context)
- func (s *HighwayServer) DownloadBlob(ctx context.Context, req *highwayv1.MsgDownloadBlob) (*highwayv1.MsgDownloadBlobResponse, error)
- func (s *HighwayServer) DownloadBlobHTTP(c *gin.Context)
- func (s *HighwayServer) FinishAccessName(c *gin.Context)
- func (s *HighwayServer) FinishRegisterName(c *gin.Context)
- func (s *HighwayServer) ListenChannel(req *v1.MsgListenChannel, stream v1.Highway_ListenChannelServer) error
- func (s *HighwayServer) ListenChannelHTTP(c *gin.Context)
- func (s *HighwayServer) RemoveBlob(ctx context.Context, req *highwayv1.MsgRemoveBlob) (*highwayv1.MsgRemoveBlobResponse, error)
- func (s *HighwayServer) RemoveBlobHTTP(c *gin.Context)
- func (s *HighwayServer) Serve()
- func (s *HighwayServer) StartAccessName(c *gin.Context)
- func (s *HighwayServer) StartRegisterName(c *gin.Context)
- func (s *HighwayServer) UpdateBucket(ctx context.Context, req *bt.MsgUpdateBucket) (*bt.MsgUpdateBucketResponse, error)
- func (s *HighwayServer) UpdateBucketHTTP(c *gin.Context)
- func (s *HighwayServer) UpdateChannel(ctx context.Context, req *ct.MsgUpdateChannel) (*ct.MsgUpdateChannelResponse, error)
- func (s *HighwayServer) UpdateChannelHTTP(c *gin.Context)
- func (s *HighwayServer) UpdateName(ctx context.Context, req *rt.MsgUpdateName) (*rt.MsgUpdateNameResponse, error)
- func (s *HighwayServer) UpdateNameHTTP(c *gin.Context)
- func (s *HighwayServer) UpdateObject(ctx context.Context, req *ot.MsgUpdateObject) (*ot.MsgUpdateObjectResponse, error)
- func (s *HighwayServer) UpdateObjectHTTP(c *gin.Context)
- func (s *HighwayServer) UploadBlob(ctx context.Context, req *highwayv1.MsgUploadBlob) (*highwayv1.MsgUploadBlobResponse, error)
- func (s *HighwayServer) UploadBlobHTTP(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
var ( ErrEmptyQueue = errors.New("No items in Transfer Queue.") ErrInvalidQuery = errors.New("No SName or PeerID provided.") ErrMissingParam = errors.New("Paramater is missing.") ErrProtocolsNotSet = errors.New("Node Protocol has not been initialized.") ErrMethodUnimplemented = errors.New("Method is not implemented.") )
Error Definitions
var (
ErrRequestBody = errors.New("Provided HTTP request body is empty or invalid.")
)
Functions ¶
This section is empty.
Types ¶
type HighwayServer ¶
type HighwayServer struct { // Config v1.HighwayServer // contains filtered or unexported fields }
HighwayServer is the RPC Service for the Custodian Node.
func NewHighway ¶
NewHighwayServer creates a new Highway service stub for the node.
func (*HighwayServer) CreateBucket ¶
func (s *HighwayServer) CreateBucket(ctx context.Context, req *bt.MsgCreateBucket) (*bt.MsgCreateBucketResponse, error)
CreateBucket creates a new bucket.
func (*HighwayServer) CreateBucketHTTP ¶ added in v0.23.0
func (s *HighwayServer) CreateBucketHTTP(c *gin.Context)
CreateBucketHTTP creates a new bucket via HTTP.
func (*HighwayServer) CreateChannel ¶
func (s *HighwayServer) CreateChannel(ctx context.Context, req *ct.MsgCreateChannel) (*ct.MsgCreateChannelResponse, error)
CreateChannel creates a new channel.
func (*HighwayServer) CreateChannelHTTP ¶ added in v0.23.0
func (s *HighwayServer) CreateChannelHTTP(c *gin.Context)
CreateChannelHTTP creates a new channel via HTTP.
func (*HighwayServer) CreateObject ¶
func (s *HighwayServer) CreateObject(ctx context.Context, req *ot.MsgCreateObject) (*ot.MsgCreateObjectResponse, error)
CreateObject creates a new object.
func (*HighwayServer) CreateObjectHTTP ¶ added in v0.23.0
func (s *HighwayServer) CreateObjectHTTP(c *gin.Context)
CreateBucketHTTP creates a new bucket via HTTP.
func (*HighwayServer) DeactivateBucket ¶ added in v0.23.0
func (s *HighwayServer) DeactivateBucket(ctx context.Context, req *bt.MsgDeactivateBucket) (*bt.MsgDeactivateBucketResponse, error)
DeactivateBucket disables a bucket for a registered application
func (*HighwayServer) DeactivateBucketHTTP ¶ added in v0.23.0
func (s *HighwayServer) DeactivateBucketHTTP(c *gin.Context)
DeactivateBucketHTTP disables a bucket for a registered application via HTTP. @Summary Deactivate Bucket @Schemes @Description DeactivateBucket disables a bucket for a registered application via HTTP. @Produce json @Success 200 {string} message @Failure 400 {string} message @Failure 502 {string} message @Router /bucket/deactivate/:cid [get]
func (*HighwayServer) DeactivateChannel ¶ added in v0.23.0
func (s *HighwayServer) DeactivateChannel(ctx context.Context, req *ct.MsgDeactivateChannel) (*ct.MsgDeactivateChannelResponse, error)
DeactivateChannel disables a Channel for a registered application
func (*HighwayServer) DeactivateChannelHTTP ¶ added in v0.23.0
func (s *HighwayServer) DeactivateChannelHTTP(c *gin.Context)
@Summary Deactivate Channel @Schemes @Description DeactivateChannel disables a Channel for a registered application @Produce json @Success 200 {string} message @Failure 500 {string} message
func (*HighwayServer) DeactivateObject ¶ added in v0.23.0
func (s *HighwayServer) DeactivateObject(ctx context.Context, req *ot.MsgDeactivateObject) (*ot.MsgDeactivateObjectResponse, error)
DeactivateBucket disables a bucket for a registered application
func (*HighwayServer) DeactivateObjectlHTTP ¶ added in v0.23.0
func (s *HighwayServer) DeactivateObjectlHTTP(c *gin.Context)
DeactivateBucketHTTP disables a bucket for a registered application via HTTP.
func (*HighwayServer) DownloadBlob ¶ added in v0.23.0
func (s *HighwayServer) DownloadBlob(ctx context.Context, req *highwayv1.MsgDownloadBlob) (*highwayv1.MsgDownloadBlobResponse, error)
DownloadBlob downloads a file from IPFS given its CID.
func (*HighwayServer) DownloadBlobHTTP ¶ added in v0.23.0
func (s *HighwayServer) DownloadBlobHTTP(c *gin.Context)
@Summary Download File @Schemes @Description DownloadBlob downloads a file from IPFS given its CID. @Produce json @Success 200 {array} byte @Failure 500 {string} message @Router /blob/download/:cid [get]
func (*HighwayServer) FinishAccessName ¶ added in v0.21.0
func (s *HighwayServer) FinishAccessName(c *gin.Context)
FinishAccessName handles the login of a credential and returns a PublicKeyCredentialResponse
func (*HighwayServer) FinishRegisterName ¶ added in v0.21.0
func (s *HighwayServer) FinishRegisterName(c *gin.Context)
FinishRegisterName handles the registration of a new credential
func (*HighwayServer) ListenChannel ¶ added in v0.23.0
func (s *HighwayServer) ListenChannel(req *v1.MsgListenChannel, stream v1.Highway_ListenChannelServer) error
ListenChannel listens to a channel.
func (*HighwayServer) ListenChannelHTTP ¶ added in v0.23.0
func (s *HighwayServer) ListenChannelHTTP(c *gin.Context)
ListenChannelHTTP listens to a channel via HTTP.
func (*HighwayServer) RemoveBlob ¶ added in v0.23.0
func (s *HighwayServer) RemoveBlob(ctx context.Context, req *highwayv1.MsgRemoveBlob) (*highwayv1.MsgRemoveBlobResponse, error)
RemoveBlob deletes a file from IPFS given its CID.
func (*HighwayServer) RemoveBlobHTTP ¶ added in v0.23.0
func (s *HighwayServer) RemoveBlobHTTP(c *gin.Context)
@Summary Remove Blob @Schemes @Description RemoveBlob deletes a file from IPFS given its CID. @Produce json @Success 200 {boolean} success @Failure 500 {string} message @Router /blob/remove/:cid [get]
func (*HighwayServer) StartAccessName ¶ added in v0.21.0
func (s *HighwayServer) StartAccessName(c *gin.Context)
StartAccessName accesses the user's existing credentials and returns a PublicKeyCredentialRequestOptions
func (*HighwayServer) StartRegisterName ¶ added in v0.21.0
func (s *HighwayServer) StartRegisterName(c *gin.Context)
RegisterNameStart starts the registration process for webauthn on http
func (*HighwayServer) UpdateBucket ¶
func (s *HighwayServer) UpdateBucket(ctx context.Context, req *bt.MsgUpdateBucket) (*bt.MsgUpdateBucketResponse, error)
UpdateBucket updates a bucket.
func (*HighwayServer) UpdateBucketHTTP ¶ added in v0.23.0
func (s *HighwayServer) UpdateBucketHTTP(c *gin.Context)
UpdateBucketHTTP updates a bucket via HTTP.
func (*HighwayServer) UpdateChannel ¶
func (s *HighwayServer) UpdateChannel(ctx context.Context, req *ct.MsgUpdateChannel) (*ct.MsgUpdateChannelResponse, error)
UpdateChannel updates a channel.
func (*HighwayServer) UpdateChannelHTTP ¶ added in v0.23.0
func (s *HighwayServer) UpdateChannelHTTP(c *gin.Context)
UpdateChannelHTTP updates a channel via HTTP.
func (*HighwayServer) UpdateName ¶
func (s *HighwayServer) UpdateName(ctx context.Context, req *rt.MsgUpdateName) (*rt.MsgUpdateNameResponse, error)
UpdateName updates a name.
func (*HighwayServer) UpdateNameHTTP ¶ added in v0.23.0
func (s *HighwayServer) UpdateNameHTTP(c *gin.Context)
UpdateNameHTTP updates a name via http.
func (*HighwayServer) UpdateObject ¶
func (s *HighwayServer) UpdateObject(ctx context.Context, req *ot.MsgUpdateObject) (*ot.MsgUpdateObjectResponse, error)
UpdateObject updates an object.
func (*HighwayServer) UpdateObjectHTTP ¶ added in v0.23.0
func (s *HighwayServer) UpdateObjectHTTP(c *gin.Context)
CreateBucketHTTP creates a new bucket via HTTP.
func (*HighwayServer) UploadBlob ¶ added in v0.23.0
func (s *HighwayServer) UploadBlob(ctx context.Context, req *highwayv1.MsgUploadBlob) (*highwayv1.MsgUploadBlobResponse, error)
UploadBlob uploads a file to IPFS and returns its CID.
func (*HighwayServer) UploadBlobHTTP ¶ added in v0.23.0
func (s *HighwayServer) UploadBlobHTTP(c *gin.Context)
@Summary Upload File @Schemes @Description UploadBlob uploads a file to IPFS and returns its CID. @Produce json @Success 200 {string} cid @Failure 500 {string} message @Router /blob/upload [post]