Documentation ¶
Index ¶
- Variables
- func SetBool(key string) func(bool) func(map[string]interface{})
- func SetInt(key string) func(int) func(map[string]interface{})
- func ToCaller(v *Caller) func(string, interface{}) error
- func ToProtobuf(x *Config) (*pb.OpConfig, error)
- func ToSimpleStorage(v *SimpleStorage) func(string, interface{}) error
- type Caller
- type CallerFactory
- type Config
- type DevicedCaller
- type DevicedSimpleStorage
- func (s *DevicedSimpleStorage) Get(ctx context.Context, obj *pb.Object) (*pb.Object, error)
- func (s *DevicedSimpleStorage) GetContent(ctx context.Context, obj *pb.Object) ([]byte, error)
- func (s *DevicedSimpleStorage) List(ctx context.Context, obj *pb.Object, opts ...SimpleStorageListOption) ([]*pb.Object, error)
- func (s *DevicedSimpleStorage) Put(ctx context.Context, obj *pb.Object, rd io.Reader) error
- func (s *DevicedSimpleStorage) Remove(ctx context.Context, obj *pb.Object) error
- func (s *DevicedSimpleStorage) Rename(ctx context.Context, src, dst *pb.Object) error
- type MockCaller
- type MockSimpleStorage
- func (m *MockSimpleStorage) Get(ctx context.Context, obj *pb.Object) (*pb.Object, error)
- func (m *MockSimpleStorage) GetContent(ctx context.Context, obj *pb.Object) ([]byte, error)
- func (m *MockSimpleStorage) List(ctx context.Context, obj *pb.Object, opts ...SimpleStorageListOption) ([]*pb.Object, error)
- func (m *MockSimpleStorage) Put(ctx context.Context, obj *pb.Object, rd io.Reader) error
- func (m *MockSimpleStorage) Remove(ctx context.Context, obj *pb.Object) error
- func (m *MockSimpleStorage) Rename(ctx context.Context, src, dst *pb.Object) error
- func (m *MockSimpleStorage) SetGetContentResult(buf []byte)
- func (m *MockSimpleStorage) SetGetResult(obj *pb.Object)
- func (m *MockSimpleStorage) SetListResult(objs []*pb.Object)
- type SimpleStorage
- type SimpleStorageFactory
- type SimpleStorageListOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedSimpleStorageFactory = errors.New("unsupported simple storage driver") ErrUnsupportedCallerFactory = errors.New("unsupported caller driver") ErrMethodNotFound = errors.New("method not found") ErrModuleNotFound = errors.New("module not found") ErrConfigNotFound = errors.New("config not found") )
View Source
var ( SimpleStorageListOption_SetRecursive = SetBool("recursive") SimpleStorageListOption_SetDepth = SetInt("depth") )
Functions ¶
func ToSimpleStorage ¶
func ToSimpleStorage(v *SimpleStorage) func(string, interface{}) error
Types ¶
type Caller ¶ added in v1.1.27
type Caller interface {
UnaryCall(ctx context.Context, device, module, method string, arguments map[string]interface{}) (map[string]interface{}, error)
}
func NewDevicedCaller ¶ added in v1.1.27
type CallerFactory ¶ added in v1.1.27
type Config ¶ added in v1.1.27
func LookupConfig ¶ added in v1.1.27
type DevicedCaller ¶ added in v1.1.27
type DevicedCaller struct {
// contains filtered or unexported fields
}
type DevicedSimpleStorage ¶
type DevicedSimpleStorage struct {
// contains filtered or unexported fields
}
func (*DevicedSimpleStorage) GetContent ¶
func (*DevicedSimpleStorage) List ¶
func (s *DevicedSimpleStorage) List(ctx context.Context, obj *pb.Object, opts ...SimpleStorageListOption) ([]*pb.Object, error)
type MockCaller ¶ added in v1.1.27
type MockSimpleStorage ¶
func (*MockSimpleStorage) GetContent ¶
func (*MockSimpleStorage) List ¶
func (m *MockSimpleStorage) List(ctx context.Context, obj *pb.Object, opts ...SimpleStorageListOption) ([]*pb.Object, error)
func (*MockSimpleStorage) SetGetContentResult ¶
func (m *MockSimpleStorage) SetGetContentResult(buf []byte)
func (*MockSimpleStorage) SetGetResult ¶
func (m *MockSimpleStorage) SetGetResult(obj *pb.Object)
func (*MockSimpleStorage) SetListResult ¶
func (m *MockSimpleStorage) SetListResult(objs []*pb.Object)
type SimpleStorage ¶
type SimpleStorage interface { Put(context.Context, *pb.Object, io.Reader) error Remove(context.Context, *pb.Object) error Rename(ctx context.Context, src *pb.Object, dst *pb.Object) error Get(context.Context, *pb.Object) (*pb.Object, error) GetContent(context.Context, *pb.Object) ([]byte, error) List(context.Context, *pb.Object, ...SimpleStorageListOption) ([]*pb.Object, error) }
func NewDevicedSimpleStorage ¶
func NewDevicedSimpleStorage(args ...interface{}) (SimpleStorage, error)
func NewSimpleStorage ¶
func NewSimpleStorage(name string, args ...interface{}) (SimpleStorage, error)
type SimpleStorageFactory ¶
type SimpleStorageFactory func(...interface{}) (SimpleStorage, error)
type SimpleStorageListOption ¶
type SimpleStorageListOption func(map[string]interface{})
Click to show internal directories.
Click to hide internal directories.