Documentation
¶
Index ¶
- Constants
- Variables
- func NewTransport(listenAddr string, listenAddrSSL string, ownURLs types.Set[string], ...) (*transport, error)
- type AcceptHeader
- type HeadResponse
- type LightClient
- func (c *LightClient) Authorize() error
- func (c *LightClient) FetchTx(stateURI string, txID state.Version) (*tree.Tx, error)
- func (c *LightClient) Get(stateURI string, version *state.Version, keypath state.Keypath, ...) (io.ReadCloser, int64, []state.Version, error)
- func (c *LightClient) HaveBlob(blobID blob.ID) (bool, error)
- func (c *LightClient) Head(stateURI string, keypath state.Keypath) (HeadResponse, error)
- func (c *LightClient) Put(ctx context.Context, tx tree.Tx) error
- func (c *LightClient) StoreBlob(file io.Reader) (StoreBlobResponse, error)
- func (c *LightClient) Subscribe(ctx context.Context, stateURI string) (chan MaybeTx, error)
- type MaybeTx
- type ParentsHeader
- type RangeRequest
- type RangeType
- type StoreBlobResponse
- type Transport
Constants ¶
View Source
const (
TransportName string = "braidhttp"
)
Variables ¶
View Source
var ( RangeTypeBytes = RangeType{"bytes"} RangeTypeJSON = RangeType{"json"} )
View Source
var (
ErrBadCookie = errors.New("bad cookie")
)
Functions ¶
func NewTransport ¶
func NewTransport( listenAddr string, listenAddrSSL string, ownURLs types.Set[string], defaultStateURI string, controllerHub tree.ControllerHub, keyStore identity.KeyStore, blobStore blob.Store, peerStore swarm.PeerStore, tlsCertFilename, tlsKeyFilename string, tlsCerts []tls.Certificate, jwtSecret []byte, devMode bool, ) (*transport, error)
Types ¶
type AcceptHeader ¶
func (AcceptHeader) Contains ¶
func (h AcceptHeader) Contains(s string) bool
func (*AcceptHeader) UnmarshalHTTPHeader ¶
func (h *AcceptHeader) UnmarshalHTTPHeader(header string) error
type HeadResponse ¶
type LightClient ¶
type LightClient struct {
// contains filtered or unexported fields
}
func NewLightClient ¶
func NewLightClient(dialAddr string, sigkeys *crypto.SigKeypair, enckeys *crypto.AsymEncKeypair, tls bool) (*LightClient, error)
func (*LightClient) Authorize ¶
func (c *LightClient) Authorize() error
func (*LightClient) Get ¶
func (c *LightClient) Get(stateURI string, version *state.Version, keypath state.Keypath, rangeReq *RangeRequest, raw bool) (io.ReadCloser, int64, []state.Version, error)
func (*LightClient) Head ¶
func (c *LightClient) Head(stateURI string, keypath state.Keypath) (HeadResponse, error)
func (*LightClient) StoreBlob ¶
func (c *LightClient) StoreBlob(file io.Reader) (StoreBlobResponse, error)
type ParentsHeader ¶
func (ParentsHeader) Slice ¶
func (h ParentsHeader) Slice() []state.Version
func (*ParentsHeader) UnmarshalHTTPHeader ¶
func (h *ParentsHeader) UnmarshalHTTPHeader(header string) error
type RangeRequest ¶
type RangeRequest struct { RangeType RangeType `json:"rangeType"` Range *types.Range `json:"range"` OpenEnded bool `json:"openEnded"` }
func (*RangeRequest) BytesRange ¶
func (r *RangeRequest) BytesRange() *types.Range
func (*RangeRequest) JSONRange ¶
func (r *RangeRequest) JSONRange() *types.Range
func (*RangeRequest) MarshalHTTPHeader ¶
func (r *RangeRequest) MarshalHTTPHeader() (string, bool, error)
func (*RangeRequest) UnmarshalHTTPHeader ¶
func (r *RangeRequest) UnmarshalHTTPHeader(header string) error
type StoreBlobResponse ¶
type Transport ¶
type Transport interface { process.Interface swarm.Transport protoauth.AuthTransport protoblob.BlobTransport prototree.TreeTransport ServeHTTP(w http.ResponseWriter, r *http.Request) }
Click to show internal directories.
Click to hide internal directories.