Documentation
¶
Index ¶
- Constants
- Variables
- func CreateLink(ctx context.Context, be blenc.BE, ep *protobuf.Entrypoint) (*protobuf.Entrypoint, *protobuf.WriterInfo, error)
- func DereferenceLink(ctx context.Context, be blenc.BE, link *protobuf.Entrypoint, maxRedirects int, ...) (*protobuf.Entrypoint, error)
- func UpdateLink(ctx context.Context, be blenc.BE, wi *protobuf.WriterInfo, ...) (*protobuf.Entrypoint, error)
- func UploadStaticDirectory(ctx context.Context, fsys fs.FS, be blenc.BE) (*protobuf.Entrypoint, error)
- type CinodeFS
- type HTTPHandler
Constants ¶
View Source
const (
CinodeDirMimeType = "application/cinode-dir"
)
Variables ¶
View Source
var ( ErrNotFound = blenc.ErrNotFound ErrNotADirectory = errors.New("entry is not a directory") ErrNotAFile = errors.New("entry is not a file") )
View Source
var ( ErrMaxRedirectsReached = errors.New("maximum limit of dynamic link redirects reached") ErrCorruptedLinkData = errors.New("corrupted link data") ErrInvalidEntrypoint = protobuf.ErrInvalidEntrypoint ErrInvalidEntrypointTime = protobuf.ErrInvalidEntrypointTime )
Functions ¶
func CreateLink ¶
func CreateLink(ctx context.Context, be blenc.BE, ep *protobuf.Entrypoint) (*protobuf.Entrypoint, *protobuf.WriterInfo, error)
func DereferenceLink ¶
func UpdateLink ¶
func UpdateLink(ctx context.Context, be blenc.BE, wi *protobuf.WriterInfo, ep *protobuf.Entrypoint) (*protobuf.Entrypoint, error)
Types ¶
type CinodeFS ¶
type CinodeFS struct { BE blenc.BE RootEntrypoint *protobuf.Entrypoint MaxLinkRedirects int IndexFile string CurrentTimeF func() time.Time }
func (*CinodeFS) FindEntrypoint ¶
func (*CinodeFS) OpenContent ¶
func (d *CinodeFS) OpenContent(ctx context.Context, ep *protobuf.Entrypoint) (io.ReadCloser, error)
type HTTPHandler ¶ added in v0.0.2
type HTTPHandler struct {
FS *CinodeFS
}
func (*HTTPHandler) ServeHTTP ¶ added in v0.0.2
func (h *HTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.