Documentation ¶
Index ¶
- Variables
- type Backend
- type Config
- type Entry
- type EntryType
- type FileStorageBackend
- func (s *FileStorageBackend) Close() error
- func (s *FileStorageBackend) Delete(t EntryType, keys []string) error
- func (s *FileStorageBackend) Get(t EntryType, keys []string) ([]*Entry, error)
- func (s *FileStorageBackend) List(entryType EntryType) ([]*Entry, error)
- func (s *FileStorageBackend) Put(t EntryType, entries []*Entry) error
- type Storage
- func (s *Storage) DeleteBlocks(blocks []*control_pb.BlockInfo) error
- func (s *Storage) DeleteFile(file *control_pb.FileInfo) error
- func (s *Storage) DeleteFileWithBlocks(file *control_pb.FileInfo) error
- func (s *Storage) DeletePolicy(p *control_pb.Policy) error
- func (s *Storage) DeleteRole(role *control_pb.Role) error
- func (s *Storage) GetAllFiles() []*control_pb.FileInfo
- func (s *Storage) GetAllRoleTokens(roleID string) ([]*control_pb.Token, error)
- func (s *Storage) GetBlocks(fileID string) ([]*control_pb.BlockInfo, error)
- func (s *Storage) GetFile(fileID string) (*control_pb.FileInfo, error)
- func (s *Storage) GetFileByPath(path string) (*control_pb.FileInfo, error)
- func (s *Storage) GetFilesByParentId(id string) ([]*control_pb.FileInfo, error)
- func (s *Storage) GetPolicy(name string) (*control_pb.Policy, error)
- func (s *Storage) GetRole(name string) (*control_pb.Role, error)
- func (s *Storage) GetRoleByID(roleID string) (*control_pb.Role, error)
- func (s *Storage) GetToken(accessor string) (*control_pb.Token, error)
- func (s *Storage) ListPolicies() ([]*control_pb.Policy, error)
- func (s *Storage) ListTokens() ([]*control_pb.Token, error)
- func (s *Storage) PutBlocks(blocks []*control_pb.BlockInfo) error
- func (s *Storage) RevokeToken(token *control_pb.Token) error
- func (s *Storage) SetBackend(backend Backend)
- func (s *Storage) StoreFile(file *control_pb.FileInfo) error
- func (s *Storage) StorePolicy(p *control_pb.Policy) error
- func (s *Storage) StoreRole(role *control_pb.Role) error
- func (s *Storage) StoreToken(token *control_pb.Token) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWriteTimeout = errors.New("backend storage write timeout") ErrShutdown = errors.New("backend storage is shut down") )
Functions ¶
This section is empty.
Types ¶
type FileStorageBackend ¶
type FileStorageBackend struct {
// contains filtered or unexported fields
}
func NewFileStorageBackend ¶
func NewFileStorageBackend(config Config) (*FileStorageBackend, error)
func (*FileStorageBackend) Close ¶
func (s *FileStorageBackend) Close() error
func (*FileStorageBackend) Delete ¶
func (s *FileStorageBackend) Delete(t EntryType, keys []string) error
func (*FileStorageBackend) Get ¶
func (s *FileStorageBackend) Get(t EntryType, keys []string) ([]*Entry, error)
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) DeleteBlocks ¶
func (s *Storage) DeleteBlocks(blocks []*control_pb.BlockInfo) error
func (*Storage) DeleteFile ¶
func (s *Storage) DeleteFile(file *control_pb.FileInfo) error
func (*Storage) DeleteFileWithBlocks ¶
func (s *Storage) DeleteFileWithBlocks(file *control_pb.FileInfo) error
func (*Storage) DeletePolicy ¶
func (s *Storage) DeletePolicy(p *control_pb.Policy) error
func (*Storage) DeleteRole ¶
func (s *Storage) DeleteRole(role *control_pb.Role) error
func (*Storage) GetAllFiles ¶
func (s *Storage) GetAllFiles() []*control_pb.FileInfo
func (*Storage) GetAllRoleTokens ¶
func (s *Storage) GetAllRoleTokens(roleID string) ([]*control_pb.Token, error)
func (*Storage) GetBlocks ¶
func (s *Storage) GetBlocks(fileID string) ([]*control_pb.BlockInfo, error)
func (*Storage) GetFileByPath ¶
func (s *Storage) GetFileByPath(path string) (*control_pb.FileInfo, error)
func (*Storage) GetFilesByParentId ¶
func (s *Storage) GetFilesByParentId(id string) ([]*control_pb.FileInfo, error)
func (*Storage) GetRoleByID ¶
func (s *Storage) GetRoleByID(roleID string) (*control_pb.Role, error)
func (*Storage) ListPolicies ¶
func (s *Storage) ListPolicies() ([]*control_pb.Policy, error)
func (*Storage) ListTokens ¶
func (s *Storage) ListTokens() ([]*control_pb.Token, error)
func (*Storage) RevokeToken ¶
func (s *Storage) RevokeToken(token *control_pb.Token) error
func (*Storage) SetBackend ¶
func (*Storage) StoreFile ¶
func (s *Storage) StoreFile(file *control_pb.FileInfo) error
StoreFile puts file to memory and stores it to backend
func (*Storage) StorePolicy ¶
func (s *Storage) StorePolicy(p *control_pb.Policy) error
func (*Storage) StoreToken ¶
func (s *Storage) StoreToken(token *control_pb.Token) error
Click to show internal directories.
Click to hide internal directories.