Documentation
¶
Index ¶
- func CheckName(name string) error
- func IsValidName(name string) bool
- type Client
- func (nsc *Client) CreateAt(ctx context.Context, nsh blobcache.Handle, name string, ...) (*blobcache.Handle, error)
- func (nsc *Client) Delete(ctx context.Context, nsh blobcache.Handle, name string) error
- func (nsc *Client) GC(ctx context.Context, volh blobcache.Handle) error
- func (nsc *Client) Get(ctx context.Context, volh blobcache.Handle, name string, dst *Entry) (bool, error)
- func (nsc *Client) Init(ctx context.Context, volh blobcache.Handle) error
- func (nsc *Client) List(ctx context.Context, volh blobcache.Handle) ([]Entry, error)
- func (nsc *Client) ListNames(ctx context.Context, volh blobcache.Handle) ([]string, error)
- func (nsc *Client) OpenAt(ctx context.Context, nsh blobcache.Handle, name string, ...) (*blobcache.Handle, error)
- func (nsc *Client) Put(ctx context.Context, nsh blobcache.Handle, name string, volh blobcache.Handle, ...) error
- type Entry
- type Namespace
- type Objectish
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidName ¶
Types ¶
type Client ¶
Client allows manipulation of namespace volumes.
func ClientForVolume ¶
ClientForVolume returns a Client configured to use the Namespace schema for the Volume If the Volume does not have a known Schema or the Schema is not Namespace then an error is returned.
type Entry ¶
type Entry struct {
// Name is the key for this entry within the namespace.
Name string `json:"name"`
// Target is the OID of the entry.
Target blobcache.OID `json:"target"`
// Rights is the set of rights for the entry.
Rights blobcache.ActionSet `json:"rights"`
Secret blobcache.LTSecret `json:"secret"`
}
Entry represents an entry in a namespace.
type Namespace ¶
type Namespace interface {
NSList(ctx context.Context, s bcsdk.RO, root []byte) ([]Entry, error)
// NSGet retrieves the entry at the given name.
// If the entry exists, it is returned in dst and true is returned.
// If the entry does not exist, dst is not modified and false is returned.
NSGet(ctx context.Context, s bcsdk.RO, root []byte, name string, dst *Entry) (bool, error)
// Delete deletes the entry at the given name.
// Delete is idempotent, and does not fail if the entry does not exist.
NSDelete(ctx context.Context, s bcsdk.RW, root []byte, name string) ([]byte, error)
// Put performs an idempotent create or replace operation.
NSPut(ctx context.Context, s bcsdk.RW, root []byte, ent Entry) ([]byte, error)
}
Namespace is an interface for Schemas which support common Namespace operations.
type Objectish ¶
Objectish is information capable of producing a Handle to an Object. Base is used to establish a connection to the local node. If the Secret is empty, then OpenFiat will be used to establish a connection The zero value for Objectish refers to the root Volume.
func ParseObjectish ¶
func (*Objectish) BaseHandle ¶
func (*Objectish) BaseIsHandle ¶
BaseIsHandle returns true if Base is a handle instead of an OID