highway

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2022 License: GPL-3.0 Imports: 35 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

View Source
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

func NewHighway(ctx context.Context, opts ...config.Option) (*HighwayServer, error)

NewHighwayServer creates a new Highway service stub for the node.

func (*HighwayServer) CreateBucket

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

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

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

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

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

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

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

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) Serve

func (s *HighwayServer) Serve()

Serve starts the RPC Service.

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

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

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

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

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

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]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL