Documentation
¶
Index ¶
- Constants
- Variables
- func ParseLibrary(path string) (map[Series][]Entry, error)
- func ParseSeries(path string) (Series, []Entry, error)
- func Sha256(s string) string
- type ChangePasswordRequest
- type ChangeUsernameRequest
- type Entry
- type Page
- type Pages
- type ParseError
- type ParseErrorItem
- type Series
- type Server
- func (s *Server) AddUser(u User, _ *struct{}) error
- func (s *Server) ChangePassword(req ChangePasswordRequest, _ *struct{}) error
- func (s *Server) ChangeUsername(req ChangeUsernameRequest, _ *struct{}) error
- func (s *Server) DeleteUser(name string, _ *struct{}) error
- func (s *Server) Dump(_ struct{}, output *string) error
- func (s *Server) Scan(_ struct{}, _ *struct{}) error
- func (s *Server) Start() error
- func (s *Server) Stop()
- type ServerConfig
- type Store
- func (s *Store) AddUser(name, pass string) error
- func (s *Store) AuthLogin(name, pass string) bool
- func (s *Store) ChangePassword(name, pass string) error
- func (s *Store) ChangeUsername(oldName, newName string) error
- func (s *Store) Close() error
- func (s *Store) DeleteUser(name string) error
- func (s *Store) Dump() (string, error)
- func (s *Store) GetCatalog() ([]Series, error)
- func (s *Store) GetEntries(sid string) ([]Entry, error)
- func (s *Store) GetEntry(sid, eid string) (Entry, error)
- func (s *Store) GetPage(sid, eid string, pageNum int) (*bytes.Buffer, string, error)
- func (s *Store) GetSeries(sid string) (Series, error)
- func (s *Store) GetThumbnail(sid, eid string) (*bytes.Buffer, string, error)
- func (s *Store) PopulateCatalog(input map[Series][]Entry) error
- func (s *Store) Vacuum() error
- type User
Constants ¶
View Source
const InMemory string = "file::memory:"
Variables ¶
View Source
var Version = "dev"
We override the version during build time
Functions ¶
Types ¶
type ChangePasswordRequest ¶
type ChangePasswordRequest struct {
Name, Password string
}
type ChangeUsernameRequest ¶
type ChangeUsernameRequest struct {
OldName, NewName string
}
type Entry ¶
type Entry struct {
EID string
SID string
Title string
ModTime time.Time
Archive string
Filesize int64
Pages Pages
}
func ParseEntry ¶
type ParseError ¶
type ParseError struct {
Items []ParseErrorItem
}
func (*ParseError) Error ¶
func (pe *ParseError) Error() string
type ParseErrorItem ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config ServerConfig) (*Server, error)
func (*Server) ChangePassword ¶
func (s *Server) ChangePassword(req ChangePasswordRequest, _ *struct{}) error
func (*Server) ChangeUsername ¶
func (s *Server) ChangeUsername(req ChangeUsernameRequest, _ *struct{}) error
func (*Server) DeleteUser ¶
type ServerConfig ¶
type ServerConfig struct {
Host string `toml:"host"`
HttpPort uint16 `toml:"http_port"`
RpcPort uint16 `toml:"rpc_port"`
DataPath string `toml:"data_path"`
LibraryPath string `toml:"library_path"`
ScanInterval duration `toml:"scan_interval"`
LogLevel string `toml:"log_level"`
}
func DefaultServerConfig ¶
func DefaultServerConfig() ServerConfig
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ChangePassword ¶
func (*Store) ChangeUsername ¶
func (*Store) DeleteUser ¶
func (*Store) GetCatalog ¶
func (*Store) GetThumbnail ¶
Click to show internal directories.
Click to hide internal directories.