Documentation ¶
Index ¶
- Variables
- type Application
- type ByAsc
- type ByDesc
- type CONFIG
- func (c *CONFIG) Bool(option string) (result, found bool)
- func (c *CONFIG) BoolDefault(option string, dfault bool) bool
- func (c *CONFIG) Duration(option string) (result time.Duration, found bool)
- func (c *CONFIG) DurationDefault(option string, dfault time.Duration) time.Duration
- func (c *CONFIG) Float(option string) (result float64, found bool)
- func (c *CONFIG) FloatDefault(option string, dfault float64) float64
- func (c *CONFIG) HasSection(section string) bool
- func (c *CONFIG) Int(option string) (result int, found bool)
- func (c *CONFIG) IntDefault(option string, dfault int) int
- func (c *CONFIG) MultiString(option string, sep string) ([]string, bool)
- func (c *CONFIG) MultiStringDefault(option, sep string, dfault []string) []string
- func (c *CONFIG) Options(prefix string) []string
- func (c *CONFIG) Raw() *config.Config
- func (c *CONFIG) Save(fn string) error
- func (c *CONFIG) SetOption(name, value string)
- func (c *CONFIG) SetSection(section string)
- func (c *CONFIG) String(option string) (result string, found bool)
- func (c *CONFIG) StringDefault(option, dfault string) string
- type Click
- type Options
- type OrderBy
- type Pages
- func (pages *Pages) All() []*page.Page
- func (pages *Pages) Limit(offset, size int64) []*page.Page
- func (pages *Pages) Nested(flag bool) *Pages
- func (pages *Pages) OrderBy(field string, asc bool) *Pages
- func (pages *Pages) Pagination(url string, size int) []*PaginationItem
- func (pages *Pages) Query(json string) *Pages
- func (pages *Pages) QueryDatetimeRange(field, start, end string) *Pages
- func (pages *Pages) QueryDatetimeRangeInclusive(field, start, end string, startInc bool, endInc bool) *Pages
- func (pages *Pages) QueryMatch(field string, match string) *Pages
- func (pages *Pages) QueryMatchPhrase(field string, phrase string) *Pages
- func (pages *Pages) QueryNumberRange(field string, start, end interface{}) *Pages
- func (pages *Pages) QueryNumberRangeInclusive(field string, start, end interface{}, startInc bool, endInc bool) *Pages
- func (pages *Pages) QueryRegexp(field string, regex string) *Pages
- func (pages *Pages) QueryString(field string, str string) *Pages
- func (pages *Pages) QueryTerm(field string, term string) *Pages
- func (pages *Pages) QueryTermPrefix(field string, prefix string) *Pages
- func (pages *Pages) Total() int
- type PaginationItem
- type QRCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ItWorks string = `` /* 510-byte string literal not displayed */
View Source
var PagesOffset int64 = 0
View Source
var PagesSize int64 = 20
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { sync.RWMutex log.Logger // option & config Options *Options Configs *CONFIG // contains filtered or unexported fields }
func NewApplication ¶
func NewApplication(options *Options, configs *CONFIG, logger log.Logger) *Application
func (*Application) Exit ¶
func (app *Application) Exit()
func (*Application) Init ¶
func (app *Application) Init() error
func (*Application) Main ¶
func (app *Application) Main()
func (*Application) Refresh ¶
func (app *Application) Refresh()
func (*Application) Version ¶
func (app *Application) Version(version string)
type CONFIG ¶
func DefaultCONFIG ¶
func DefaultCONFIG() *CONFIG
func LoadCONFIG ¶
func (*CONFIG) DurationDefault ¶
func (*CONFIG) HasSection ¶
func (*CONFIG) MultiString ¶
func (*CONFIG) MultiStringDefault ¶
func (*CONFIG) Options ¶
Options returns all configuration option keys. If a prefix is provided, then that is applied as a filter.
func (*CONFIG) SetSection ¶
func (*CONFIG) StringDefault ¶
type Options ¶
type Options struct { HTTPAddress string HTTPSAddress string AppID string AppSecret string StaticRoot string MarkdownRoot string TemplateRoot string LogsRoot string StorageRoot string IndexesRoot string TempRoot string Root string StorageMax uint64 RefreshInterval time.Duration }
func NewOptions ¶
func (*Options) SetApplication ¶
func (*Options) SetRefreshDefault ¶
func (*Options) SetStorargeMax ¶
type Pages ¶
type Pages struct {
// contains filtered or unexported fields
}
func (*Pages) Pagination ¶
func (pages *Pages) Pagination(url string, size int) []*PaginationItem
func (*Pages) QueryDatetimeRange ¶
func (*Pages) QueryDatetimeRangeInclusive ¶
func (*Pages) QueryMatchPhrase ¶
func (*Pages) QueryNumberRange ¶
func (*Pages) QueryNumberRangeInclusive ¶
func (*Pages) QueryTermPrefix ¶
type PaginationItem ¶
func NewPaginationItem ¶
func NewPaginationItem(no int, size int, url string) *PaginationItem
Click to show internal directories.
Click to hide internal directories.