Documentation ¶
Index ¶
- Constants
- Variables
- func Define(c Config) error
- func EncodeToken(t Token, guest *security.Identity) (string, error)
- func List() []string
- func Load(name string) ([]transport.Config, error)
- func Save(name string, configs []transport.Config) error
- type AccessFile
- type Config
- type Consumer
- type Grant
- type Head
- type Header
- type Identity
- type Keystore
- type Pool
- func (p *Pool) Close()
- func (p *Pool) Delete() error
- func (p *Pool) ExportAccessFile(e transport.Exchanger) error
- func (p *Pool) Get(id uint64, rang *transport.Range, w io.Writer) error
- func (p *Pool) Identities() ([]Identity, error)
- func (p *Pool) ImportAccess(e transport.Exchanger) (hash.Hash, error)
- func (p *Pool) List(afterId uint64, afterTs time.Time) []Head
- func (p *Pool) Post(name string, r io.Reader, meta []byte) (Head, error)
- func (p *Pool) Sync()
- type Token
Constants ¶
View Source
const ( ID_CREATE = 0x0 ID_FORCE_CREATE = 0x1 )
View Source
const SafeConfigFile = ".safepool-pool.json"
Variables ¶
View Source
var Connections = map[string]transport.Exchanger{}
View Source
var ConnectionsMutex = &sync.Mutex{}
View Source
var ErrAlreadyExist = errors.New("pool already exists")
View Source
var ErrInvalidConfig = errors.New("provided config is invalid: missing name or configs")
View Source
var ErrInvalidSignature = errors.New("signature is invalid")
View Source
var ErrInvalidToken = errors.New("provided token is invalid: missing name or configs")
View Source
var ErrNoExchange = errors.New("no Exchange available")
View Source
var ErrNotAuthorized = errors.New("no authorization for this file")
View Source
var ErrNotTrusted = errors.New("the author is not a trusted user")
View Source
var ForceCreation = false
View Source
var ReplicaPeriod = time.Hour
Functions ¶
Types ¶
type AccessFile ¶
Click to show internal directories.
Click to hide internal directories.