Documentation
¶
Index ¶
- Constants
- Variables
- func NewWebPkgGetter(b bus.Bus, unixFsID, unixFsPrefix string, returnIfIdle bool) web_pkg_controller.WebPkgGetter
- type Config
- func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Config) CloneVT() *Config
- func (this *Config) EqualMessageVT(thatMsg any) bool
- func (this *Config) EqualVT(that *Config) bool
- func (c *Config) EqualsConfig(other config.Config) bool
- func (c *Config) GetConfigID() string
- func (x *Config) GetNotFoundIfIdle() bool
- func (x *Config) GetUnixfsId() string
- func (x *Config) GetUnixfsPrefix() string
- func (x *Config) GetWebPkgIdList() []string
- func (x *Config) MarshalJSON() ([]byte, error)
- func (x *Config) MarshalProtoJSON(s *json.MarshalState)
- func (x *Config) MarshalProtoText() string
- func (m *Config) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Config) MarshalToVT(dAtA []byte) (int, error)
- func (m *Config) MarshalVT() (dAtA []byte, err error)
- func (*Config) ProtoMessage()
- func (x *Config) Reset()
- func (m *Config) SizeVT() (n int)
- func (x *Config) String() string
- func (x *Config) UnmarshalJSON(b []byte) error
- func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Config) UnmarshalVT(dAtA []byte) error
- func (c *Config) Validate() error
- type Controller
- type Factory
Constants ¶
const ConfigID = ControllerID
ConfigID is the config identifier.
const ControllerID = "bldr/web/pkg/fs/controller"
ControllerID is the controller identifier.
Variables ¶
var Version = semver.MustParse("0.0.1")
Version is the controller version.
Functions ¶
func NewWebPkgGetter ¶
func NewWebPkgGetter(b bus.Bus, unixFsID, unixFsPrefix string, returnIfIdle bool) web_pkg_controller.WebPkgGetter
NewWebPkgGetter constructs a new web pkg getter function.
Types ¶
type Config ¶
type Config struct {
// UnixfsId is the identifier for the UnixFS on the bus.
// The fs should be provided with the AccessUnixFS controller.
UnixfsId string `protobuf:"bytes,1,opt,name=unixfs_id,json=unixfsId,proto3" json:"unixfsId,omitempty"`
// UnixfsPrefix is a path prefix to apply to paths in the FS.
// This applies a chroot to the UnixFS.
UnixfsPrefix string `protobuf:"bytes,2,opt,name=unixfs_prefix,json=unixfsPrefix,proto3" json:"unixfsPrefix,omitempty"`
// NotFoundIfIdle returns 404 not found if the FS lookup becomes idle.
// Lookup becomes idle if no FS is available for the URL.
// If unset, waits until the FS is available.
NotFoundIfIdle bool `protobuf:"varint,3,opt,name=not_found_if_idle,json=notFoundIfIdle,proto3" json:"notFoundIfIdle,omitempty"`
// WebPkgIdList is a list of web pkg IDs to resolve.
// Ignored if empty.
WebPkgIdList []string `protobuf:"bytes,4,rep,name=web_pkg_id_list,json=webPkgIdList,proto3" json:"webPkgIdList,omitempty"`
// contains filtered or unexported fields
}
Config configures the web pkg fs controller. Looks up a UnixFS using AccessUnixFS. Accesses a sub-directory of that UnixFS as a static web pkg FS.
func (*Config) CloneMessageVT ¶
func (m *Config) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Config) EqualMessageVT ¶
func (*Config) EqualsConfig ¶
EqualsConfig checks if the config is equal to another.
func (*Config) GetConfigID ¶
GetConfigID returns the unique string for this configuration type.
func (*Config) GetNotFoundIfIdle ¶
func (*Config) GetUnixfsId ¶
func (*Config) GetUnixfsPrefix ¶
func (*Config) GetWebPkgIdList ¶
func (*Config) MarshalJSON ¶
MarshalJSON marshals the Config to JSON.
func (*Config) MarshalProtoJSON ¶
func (x *Config) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Config message to JSON.
func (*Config) MarshalProtoText ¶
func (*Config) MarshalToSizedBufferVT ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals the Config from JSON.
func (*Config) UnmarshalProtoJSON ¶
func (x *Config) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Config message from JSON.
func (*Config) UnmarshalVT ¶
type Controller ¶
type Controller = web_pkg_controller.Controller
Controller uses AccessUnixFS to resolve LookupWebPkg directives.
func NewController ¶
NewController constructs a new web pkg fs controller.