Documentation ¶
Index ¶
- func Active(db *gorm.DB) *gorm.DB
- func FindBy(field string, value interface{}) func(db *gorm.DB) *gorm.DB
- func GetRange(limit int, offset int) func(db *gorm.DB) *gorm.DB
- func NewConferenceService(params map[string]interface{}) *conferenceService
- func NewEventService(params map[string]interface{}) *eventService
- func NewScopeService(params map[string]interface{}) *scopeService
- func NewSearchService(params map[string]interface{}) *searchService
- func NewTagAliasService(params map[string]interface{}) *tagAliasService
- func NewTagService(params map[string]interface{}) *tagService
- func NewUserService(params map[string]interface{}) *userService
- func NewVideoService(params map[string]interface{}) *videoService
- func Paginate(limit int, page int) func(db *gorm.DB) *gorm.DB
- func Unpaginate(db *gorm.DB) *gorm.DB
- type Conference
- type Event
- type Scope
- type SearchResult
- type Service
- type Speaker
- type SpeakerService
- type Tag
- type TagAlias
- type User
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConferenceService ¶
func NewConferenceService(params map[string]interface{}) *conferenceService
func NewEventService ¶
func NewEventService(params map[string]interface{}) *eventService
func NewScopeService ¶
func NewScopeService(params map[string]interface{}) *scopeService
func NewSearchService ¶
func NewSearchService(params map[string]interface{}) *searchService
func NewTagAliasService ¶
func NewTagAliasService(params map[string]interface{}) *tagAliasService
func NewTagService ¶
func NewTagService(params map[string]interface{}) *tagService
func NewUserService ¶
func NewUserService(params map[string]interface{}) *userService
func NewVideoService ¶
func NewVideoService(params map[string]interface{}) *videoService
Types ¶
type Conference ¶
type Conference struct { Slug string `sql:"type:varchar(64)" gorm:"primary_key" binding:"required" json:"slug"` Title string `sql:"type:text" binding:"required" json:"title"` Url string `json:"url"` Type *string `sql:"not null;index" binding:"required" json:"type"` Scope *string `sql:"not null;index" json:"scope"` Description string `sql:"type:text" json:"description"` Events []Event `json:"events,omitempty" gorm:"foreignkey:conference_slug"` EventsCount uint `sql:"not null;default:0" json:"events_count"` Videos []Video `json:"videos,omitempty" gorm:"foreignkey:conference_slug"` VideosCount uint `sql:"not null;default:0" json:"videos_count"` Thumbnail string `json:"thumbnail"` IsActive *bool `sql:"not null;index" binding:"required" json:"-"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at,omitempty"` }
type Event ¶
type Event struct { ID uint `gorm:"primary_key" json:"id"` ConferenceSlug *string `sql:"not null;index" binding:"required" json:"conference_slug"` Conference *Conference `json:"conference,omitempty" gorm:"foreignkey:conference_slug"` Scope *string `sql:"not null;index" json:"scope" binding:"required"` Title string `sql:"type:text" binding:"required" json:"title"` Description string `sql:"type:text" json:"description"` Country string `sql:"index:idx_country_state_city_address" json:"country"` City string `sql:"index:idx_country_state_city_address" json:"city"` State string `sql:"index:idx_country_state_city_address" json:"state"` Address string `sql:"type:text;index:idx_country_state_city_address" json:"address"` Speakers *[]Speaker `gorm:"many2many:events_speakers" json:"speakers,omitempty"` Videos *[]Video `json:"videos,omitempty"` VideosCount uint `sql:"not null;default:0" json:"videos_count"` Thumbnail string `json:"thumbnail"` IsActive *bool `sql:"not null;index" binding:"required" json:"-"` StartsAt *time.Time `sql:"index" json:"starts_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at,omitempty"` }
type SearchResult ¶
type SearchResult struct { Type string `json:"type"` Resource interface{} `json:"resource"` }
type Speaker ¶
type Speaker struct { ID uint `gorm:"primary_key" json:"id"` FirstName *string `json:"first_name"` MiddleName *string `json:"middle_name"` LastName *string `json:"last_name"` NickName *string `json:"nick_name"` Photo string `json:"photo"` Events []Event `gorm:"many2many:events_speakers" json:"events,omitempty"` Videos []Video `gorm:"many2many:videos_speakers" json:"videos,omitempty"` DeletedAt *time.Time `json:"deleted_at,omitempty"` }
type SpeakerService ¶
type SpeakerService struct {
Service
}
func (*SpeakerService) Speaker ¶
func (this *SpeakerService) Speaker() (*Speaker, error)
type Tag ¶
type Tag struct { Slug string `gorm:"primary_key" json:"slug"` Videos []Video `gorm:"many2many:videos_tags;foreignkey:tag_slug" json:"videos,omitempty"` VideosCount uint `json:"videos_count"` DeletedAt *time.Time `json:"deleted_at,omitempty"` TagAliases []TagAlias `gorm:"foreignkey:tag_slug" json:"-"` Aliases []string `sql:"-" json:"aliases,omitempty"` }
type Video ¶
type Video struct { ID uint `gorm:"primary_key" json:"id"` Title *string `sql:"not null,type:text" binding:"required" json:"title"` Url string `json:"url"` Length *uint `json:"length,omitempty"` Description string `sql:"type:text" json:"description"` ConferenceSlug *string `sql:"not null,index" binding:"required" json:"conference_slug"` Conference *Conference `json:"conference,omitempty" gorm:"foreignkey:conference_slug"` Scope *string `sql:"not null,index" json:"scope"` TagResources *[]Tag `gorm:"many2many:videos_tags;associationforeignkey:tag_slug" json:"-"` Tags []string `sql:"-" json:"tags"` Speakers *[]Speaker `gorm:"many2many:videos_speakers" json:"speakers,omitempty"` EventID *uint `sql:"index" json:"event_id"` Event *Event `json:"event,omitempty" gorm:"foreignkey:event_id"` LikesCount uint `json:"likes_count"` DislikesCount uint `json:"likes_count"` Rating float64 `json:"rating"` Thumbnail string `sql:"type:text" json:"thumbnail"` Language *string `sql:"type:varchar(2)" json:"language"` DeletedAt *time.Time `json:"deleted_at,omitempty"` }
Click to show internal directories.
Click to hide internal directories.