Documentation ¶
Index ¶
- type LocalStorage
- func (ls LocalStorage) BuildIndex(content []byte) error
- func (ls LocalStorage) GetCookies() ([]*http.Cookie, error)
- func (ls LocalStorage) ID2FrontendID(questionID int) int
- func (ls LocalStorage) ReadDetail(name string) (client.Question, error)
- func (ls LocalStorage) ReadList() (client.AlgorithmList, error)
- func (ls LocalStorage) ReadTypedCode(name string, extension string) string
- func (ls LocalStorage) SaveAlgorithmAns(name string, extension string, content []byte) string
- func (ls LocalStorage) SaveAlgorithmDetail(algorithmDetail []byte, titleSlug string) error
- func (ls LocalStorage) SaveAlgorithmList(algorithmList []byte) error
- func (ls LocalStorage) SaveConnectionInfo(info client.ConnectionInfo) error
- func (ls LocalStorage) SearchIndexWithID(questionID int) string
- type QuestionIndex
- type Storage
- type StorageArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStorage ¶
func NewLocalStorage ¶
func NewLocalStorage(rootpath string, CustomPath string) LocalStorage
func (LocalStorage) BuildIndex ¶
func (ls LocalStorage) BuildIndex(content []byte) error
func (LocalStorage) GetCookies ¶
func (ls LocalStorage) GetCookies() ([]*http.Cookie, error)
func (LocalStorage) ID2FrontendID ¶
func (ls LocalStorage) ID2FrontendID(questionID int) int
func (LocalStorage) ReadDetail ¶
func (ls LocalStorage) ReadDetail(name string) (client.Question, error)
func (LocalStorage) ReadList ¶
func (ls LocalStorage) ReadList() (client.AlgorithmList, error)
func (LocalStorage) ReadTypedCode ¶
func (ls LocalStorage) ReadTypedCode(name string, extension string) string
func (LocalStorage) SaveAlgorithmAns ¶
func (ls LocalStorage) SaveAlgorithmAns(name string, extension string, content []byte) string
func (LocalStorage) SaveAlgorithmDetail ¶
func (ls LocalStorage) SaveAlgorithmDetail(algorithmDetail []byte, titleSlug string) error
func (LocalStorage) SaveAlgorithmList ¶
func (ls LocalStorage) SaveAlgorithmList(algorithmList []byte) error
func (LocalStorage) SaveConnectionInfo ¶
func (ls LocalStorage) SaveConnectionInfo(info client.ConnectionInfo) error
func (LocalStorage) SearchIndexWithID ¶
func (ls LocalStorage) SearchIndexWithID(questionID int) string
type QuestionIndex ¶
type Storage ¶
type Storage interface { SaveConnectionInfo(info client.ConnectionInfo) error SaveAlgorithmList(algorithmList []byte) error BuildIndex(content []byte) error SearchIndexWithID(questionID int) string SaveAlgorithmDetail(algorithmDetail []byte, titleSlug string) error GetCookies() ([]*http.Cookie, error) ReadList() (client.AlgorithmList, error) ReadDetail(name string) (client.Question, error) SaveAlgorithmAns(name string, extension string, content []byte) string ReadTypedCode(name string, extension string) string ID2FrontendID(questionID int) int }
func StorageGetter ¶
func StorageGetter(conf config.TomlConfig) Storage
type StorageArgs ¶
type StorageArgs struct {
Path string
}
Click to show internal directories.
Click to hide internal directories.