Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLanguageSources ¶
func GetLanguageSources() []string
GetLanguageSources returns the language sources
Types ¶
type AdderAdminResources ¶
type AdderAdminResources interface {
AddResource(value interface{}, config ...*admin.Config) *admin.Resource
}
AdderAdminResources adds resources to the admin
type AdderMultipleCommands ¶
AdderMultipleCommands adds cmd commands to the other command.
type AdminConfig ¶
type AdminConfig interface {
GetListFields() []interface{}
GetEditFields() []interface{}
}
AdminConfig is a resource admin configuration
type AdminMixin ¶
type AdminMixin interface {
Apply(interface{ AdminResource }, interface{ AdminConfig })
}
AdminMixin is a mixin for applying additional behavior the resource admin
type AdminResource ¶
type AdminResource interface {
IndexAttrs(values ...interface{}) []*admin.Section
ShowAttrs(values ...interface{}) []*admin.Section
NewAttrs(values ...interface{}) []*admin.Section
EditAttrs(values ...interface{}) []*admin.Section
Filter(filter *admin.Filter)
}
AdminResource is the admin resource interface.
type AdminResourcesRegister ¶
type AdminResourcesRegister interface {
Register(adm interface{ AdderAdminResources })
}
AdminResourcesRegister register admin resources
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the application structure.
func NewApp ¶
func NewApp(conn autoMigrater, logger Logger, mixins ...AdminMixin) *App
NewApp returns a new app object.
func (*App) AddAdminResources ¶
func (a *App) AddAdminResources(adm interface{ AdderAdminResources })
AddAdminResources adds the app admin resources commands.
func (*App) AddCommands ¶
func (a *App) AddCommands(rootCmd interface{ AdderMultipleCommands })
AddCommands adds the app cmd commands.
type Language ¶
type Language struct {
gorm.Model
Title string `gorm:"size:100;not null;index:title"`
Position uint `gorm:"not null;index:position"`
Source string `gorm:"size:100;not null;index:source"`
}
Language is a programming language struct
type Logger ¶
type Logger interface {
Infof(format string, args ...interface{})
Error(args ...interface{})
}
Logger logs errors and info.
type ScrappersRunner ¶
type ScrappersRunner struct {
// contains filtered or unexported fields
}
func NewScrapperRunner ¶
func NewScrapperRunner(logger Logger) *ScrappersRunner
func (*ScrappersRunner) Run ¶
func (s *ScrappersRunner) Run()
Click to show internal directories.
Click to hide internal directories.