Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheTimeout time.Duration = 15 * time.Minute
View Source
var ClientTimeout = 100 * time.Millisecond
Functions ¶
Types ¶
type CacheClient ¶
type CacheClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient() (*CacheClient, error)
NewClient returns an initialized RPC client.
func (*CacheClient) Close ¶
func (client *CacheClient) Close()
Close calls the underlying net/rpc.Client's Close() method.
func (*CacheClient) GetPass ¶
func (client *CacheClient) GetPass(filename, cachepass, token string) (string, error)
GetPass attempts to fetch a cached password from the server.
func (*CacheClient) IsCached ¶
func (client *CacheClient) IsCached(filename string) bool
IsCached checks if the server has a cache entry for the specified filename.
func (*CacheClient) SetPass ¶
func (client *CacheClient) SetPass(filename, masterpass, cachepass string) error
SetPass attempts to cache a password to the server.
type CacheEntry ¶
type CacheEntry struct {
// contains filtered or unexported fields
}
type CacheServer ¶
type CacheServer struct {
// contains filtered or unexported fields
}
func (*CacheServer) GetPass ¶
func (server *CacheServer) GetPass(data GetPassData, password *string) error
GetPass method exposed by the RPC server.
func (*CacheServer) IsCached ¶
func (server *CacheServer) IsCached(data IsCachedData, result *bool) error
Contains method exposed by the RPC server.
func (*CacheServer) SetPass ¶
func (server *CacheServer) SetPass(data SetPassData, notused *bool) error
SetPass method exposed by the RPC server.
type GetPassData ¶
type IsCachedData ¶
type IsCachedData struct {
Filename string
}
type SetPassData ¶
Click to show internal directories.
Click to hide internal directories.