Documentation
¶
Overview ¶
Package file 是单租户存储:一份 hosts.json,没有账号。
Index ¶
- type Store
- func (s *Store) AccountByToken(string) (*store.Account, error)
- func (s *Store) AddBytes(accountID string, n int64)
- func (s *Store) AddPushes(accountID string, n int)
- func (s *Store) ApproveDeviceCode(string, string) error
- func (s *Store) AuthenticateV1(id, name, tokenHash string, online bool) (*store.Host, error)
- func (s *Store) AuthenticateV2(id, name string, pub []byte, online, tofu, replaceWhenOffline bool) (*store.Host, error)
- func (s *Store) Ban(id string, banned bool) error
- func (s *Store) ConsumeDeviceCode(string) (*store.Account, string, error)
- func (s *Store) Count() int
- func (s *Store) CreateCLIToken(string) (string, error)
- func (s *Store) CreateDeviceCode(string, string, time.Duration) (*store.DeviceCode, error)
- func (s *Store) Flush() error
- func (s *Store) ListHosts(string) ([]*store.Host, error)
- func (s *Store) Lookup(id string) (*store.Host, bool)
- func (s *Store) LookupDeviceCode(string) (*store.DeviceCode, error)
- func (s *Store) LookupUserCode(string) (*store.DeviceCode, error)
- func (s *Store) QuotaFor(string) store.Quota
- func (s *Store) RegisterHost(_, id, name string, pub []byte, bundleID string) (*store.Host, error)
- func (s *Store) RotateEd25519(id string, pub []byte) error
- func (s *Store) SetNode(id, nodeID string) error
- func (s *Store) SetQuotaDefaults(q store.Quota)
- func (s *Store) TouchSeen(id, name string) error
- func (s *Store) UpsertAccount(string, string, string) (*store.Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AuthenticateV1 ¶
func (*Store) AuthenticateV2 ¶
func (*Store) ConsumeDeviceCode ¶
func (*Store) CreateDeviceCode ¶
func (*Store) LookupDeviceCode ¶
func (s *Store) LookupDeviceCode(string) (*store.DeviceCode, error)
func (*Store) LookupUserCode ¶
func (s *Store) LookupUserCode(string) (*store.DeviceCode, error)
func (*Store) RegisterHost ¶
func (*Store) SetQuotaDefaults ¶
Click to show internal directories.
Click to hide internal directories.