Versions in this module Expand all Collapse all v0 v0.2.1 Feb 3, 2024 Changes in this version + const ActivityFeeTypeAA + const ActivityFeeTypeFixed + const ActivityFeeTypeFree + const ActivityFeeTypeMaleAAFemaleFixed + const ActivityFeeTypeMaleFixedFemaleAA + const ActivityKindBadminton + const ActivityKindBasketball + const ActivityKindDinner + const ActivityKindFootball + const ActivityKindOther + const ActivityKindVolleyball + const ActivityStageAbort + const ActivityStageFinished + const ActivityStageInProcess + const ActivityStageSignup + const ActivityTypeClub + const ActivityTypePrivate + const ActivityTypePublic + const ClubPositionManager + const ClubPositionMember + const ClubPositionOwner + type Activity struct + Address string + Ahead uint + BeginAt time.Time + Club Club + ClubID uint + EndAt time.Time + FeeFemale uint + FeeMale uint + FeeType uint + Kind uint + Quota uint + Stage uint + Type uint + Waiting uint + type BaseField struct + CreatedAt time.Time + Creator User + CreatorID uint + Description string + ID uint + Name string + Site Site + SiteID string + UpdatedAt time.Time + type Club struct + Address string + Level uint + Logo string + Notice string + Scores uint + func (s Club) String() string + type ClubMember struct + Club Club + ClubID uint + CreatedAt time.Time + DisplayName string + EnterAt time.Time + ID uint + Position uint + Scores uint + User User + UserID uint v0.2.0 Feb 1, 2024 Changes in this version + const CREATE + const DELETE + const DefaultQueryLimit + const EDIT + const FilterOpBetween + const FilterOpEqual + const FilterOpGreater + const FilterOpGreaterOrEqual + const FilterOpIn + const FilterOpIsNot + const FilterOpLess + const FilterOpLessOrEqual + const FilterOpLike + const FilterOpNotEqual + const FilterOpNotIn + const GET + const OrderOpAsc + const OrderOpDesc + const QUERY + type AdminAccessCheck func(c *fiber.Ctx, obj *AdminObject) error + type AdminAction struct + Class string + Handler AdminActionHandler + Icon string + Label string + Name string + Path string + WithoutObject bool + type AdminActionHandler func(c *fiber.Ctx, obj any) (any, error) + type AdminAttribute struct + Choices []AdminSelectOption + Default any + FilterWidget string + Help string + SingleChoice bool + Widget string + type AdminBuildContext func(*fiber.Ctx, map[string]any) map[string]any + type AdminField struct + Attribute *AdminAttribute + CanNull bool + ElemType reflect.Type + FieldName string + Foreign *AdminForeign + IsArray bool + IsAutoID bool + IsPtr bool + Label string + Name string + NotColumn bool + Placeholder string + Primary bool + Required bool + Tag string + Type string + type AdminForeign struct + Field string + FieldName string + ForeignKey string + Path string + type AdminIcon struct + SVG string + Url string + type AdminObject struct + AccessCheck AdminAccessCheck + Actions []AdminAction + Attributes map[string]AdminAttribute + BeforeCreate BeforeCreateFunc + BeforeDelete BeforeDeleteFunc + BeforeRender BeforeRenderFunc + BeforeUpdate BeforeUpdateFunc + Desc string + EditPage string + Editables []string + Fields []AdminField + Filterables []string + GetDB GetDB + Group string + Icon *AdminIcon + Ignores map[string]bool + Invisible bool + ListPage string + MarkDeletedField string + Model any + ModelElem reflect.Type + Name string + Orderables []string + Orders []Order + Path string + Permissions map[string]bool + PluralName string + PrimaryKeyMaping map[string]string + PrimaryKeys []string + Requireds []string + Scripts []AdminScript + Searchables []string + Shows []string + Styles []string + TableName string + UniqueKeys []string + Weight int + type AdminQueryResult struct + Items []map[string]any + Keyword string + Limit int + Objects []any + Pos int + TotalCount int + type AdminScript struct + Onload bool + Src string + type AdminSelectOption struct + Label string + Value any + type AdminValue struct + Label string + Value any + type BeforeCreateFunc func(ctx *fiber.Ctx, vptr any) error + type BeforeDeleteFunc func(ctx *fiber.Ctx, vptr any) error + type BeforeQueryRenderFunc func(ctx *fiber.Ctx, r *QueryResult) (any, error) + type BeforeRenderFunc func(ctx *fiber.Ctx, vptr any) (any, error) + type BeforeUpdateFunc func(ctx *fiber.Ctx, vptr any, vals map[string]any) error + type ContentIcon AdminIcon + func (s *ContentIcon) Scan(input interface{}) error + func (s ContentIcon) Value() (driver.Value, error) + type Filter struct + IsTimeType bool + Name string + Op string + Value any + func (f *Filter) GetQuery() string + type GetDB func(c *fiber.Ctx, isCreate bool) *gorm.DB + type Order struct + Name string + Op string + func (f *Order) GetQuery() string + type PrepareQuery func(db *gorm.DB, c *fiber.Ctx) (*gorm.DB, *QueryForm, error) + type QueryForm struct + Filters []Filter + ForeignMode bool + Keyword string + Limit int + Orders []Order + Pos int + SearchFields []string + ViewFields []string + type QueryResult struct + Items []any + Keyword string + Limit int + Pos int + TotalCount int + type QueryView struct + Desc string + Method string + Path string + Prepare PrepareQuery + type UploadResult struct + ContentType string + Dimensions string + Ext string + External bool + Name string + Path string + PublicUrl string + Size int64 + StorePath string + Thumbnail string + type WebObject struct + AllowMethods int + AuthRequired bool + BeforeCreate BeforeCreateFunc + BeforeDelete BeforeDeleteFunc + BeforeQueryRender BeforeQueryRenderFunc + BeforeRender BeforeRenderFunc + BeforeUpdate BeforeUpdateFunc + Desc string + Editables []string + Filterables []string + GetDB GetDB + Group string + JsonToFields map[string]string + JsonToKinds map[string]reflect.Kind + Model any + ModelElem reflect.Type + Name string + Orderables []string + PrimaryKeys []WebObjectPrimaryField + Searchables []string + TableName string + UniqueKeys []WebObjectPrimaryField + Views []QueryView + type WebObjectPrimaryField struct + IsPrimary bool + JSONName string + Kind reflect.Kind + Name string v0.1.0 Jan 25, 2024 Changes in this version + const GroupRoleAdmin + const GroupRoleMember + const GroupTypeAdmin + const GroupTypeApp + const PermissionAll + const PermissionCreate + const PermissionDelete + const PermissionRead + const PermissionUpdate + const TableNameCategory + const TableNameComment + const TableNameConfig + const TableNameMedia + const TableNamePage + const TableNamePost + const TableNameUser + func CreateFolder(db *gorm.DB, parent, name string, user *User) (string, error) + func GenUniqueKey(tx *gorm.DB, field string, size int) (key string) + func GetTagsByCategory(db *gorm.DB, contentType string, form *TagsForm) ([]string, error) + func MakeDuplicate(db *gorm.DB, obj any) error + func MakePublish(db *gorm.DB, siteID, ID string, obj any, publish bool) error + func QueryContentByTags(db *gorm.DB, contentType string, form *QueryByTagsForm) ([]string, error) + func QueryTags(db *gorm.DB) ([]string, error) + func SafeDraft(db *gorm.DB, siteID, ID string, obj any, draft string) error + type BaseContent struct + Alt string + Author string + ContentType string + CreatedAt time.Time + Creator User + CreatorID uint + Description string + Keywords string + Published bool + PublishedAt sql.NullTime + Remark string + Tags string + Thumbnail string + Title string + UpdatedAt time.Time + type Category struct + Count int + Items CategoryItems + Name string + Site Site + SiteID string + UUID string + func QueryCategoryWithCount(db *gorm.DB, siteId, contentObject string) ([]Category, error) + func (*Category) TableName() string + func (category *Category) FindItem(path string) *CategoryItem + type CategoryItem struct + Children CategoryItems + Count int + Icon *object.ContentIcon + Name string + Path string + func (s *CategoryItem) Scan(input interface{}) error + func (s CategoryItem) Value() (driver.Value, error) + type CategoryItems []CategoryItem + func (s *CategoryItems) Scan(input interface{}) error + func (s CategoryItems) Value() (driver.Value, error) + type Comment struct + Body string + Email string + IP string + Post Post + PostID uint + User User + UserID uint + func (*Comment) TableName() string + type Config struct + Desc string + ID uint + Key string + Value string + func (*Config) TableName() string + type ContentQueryResult struct + Relations []RelationContent + Suggestions []RelationContent + type Group struct + CreatedAt time.Time + Extra string + ID uint + Name string + Permission GroupPermission + Type string + UpdatedAt time.Time + func (g Group) String() string + type GroupMember struct + CreatedAt time.Time + Group Group + GroupID uint + ID uint + Role string + User User + UserID uint + type GroupPermission struct + Permissions []string + func (p *GroupPermission) Scan(value interface{}) error + func (p GroupPermission) Value() (driver.Value, error) + type Media struct + Dimensions string + Directory bool + Ext string + External bool + Name string + Path string + PublicUrl string + Size int64 + StorePath string + func (*Media) TableName() string + func (m *Media) BuildPublicUrls(mediaHost string, mediaPrefix string) + type MediaFolder struct + FilesCount int64 + FoldersCount int64 + Name string + Path string + func ListFolders(db *gorm.DB, path string) ([]MediaFolder, error) + type Page struct + Body string + CategoryID string + CategoryPath string + Draft string + ID string + IsDraft bool + PreviewURL string + Site Site + SiteID string + func (*Page) TableName() string + type Post struct + Body string + CategoryID string + CategoryPath string + Draft string + ID string + IsDraft bool + PreviewURL string + Site Site + SiteID string + func (*Post) TableName() string + type Profile struct + Avatar string + City string + Country string + Extra map[string]any + Gender string + Region string + func (p *Profile) Scan(value interface{}) error + func (p Profile) Value() (driver.Value, error) + type PublishLog struct + Author User + AuthorID uint + Body string + Content string + ContentID string + CreatedAt time.Time + ID uint + type QueryByTagsForm struct + Limit int + Pos int + Tags []string + type QueryByTagsResult struct + Items []any + Limit int + Pos int + Total int + type RelationContent struct + ID string + SiteID string + func GetRelations(db *gorm.DB, siteId, categoryId, categoryPath, postId string, maxCount int) ([]RelationContent, error) + func GetSuggestions(db *gorm.DB, siteId, categoryId, categoryPath, postId string, maxCount int) ([]RelationContent, error) + type RenderCategory struct + Name string + Path string + PathName string + UUID string + func NewRenderCategory(db *gorm.DB, categoryID, categoryPath string) *RenderCategory + type RenderContent struct + Category *RenderCategory + ID string + IsDraft bool + PageData any + PostBody string + Relations []RelationContent + SiteID string + Suggestions []RelationContent + func NewRenderContentFromPage(db *gorm.DB, page *Page) *RenderContent + func NewRenderContentFromPost(db *gorm.DB, post *Post, relations bool) *RenderContent + type Site struct + CreatedAt time.Time + Disallow bool + Domain string + Name string + Preview string + UpdatedAt time.Time + func (s Site) String() string + type StringArray []string + func (s *StringArray) Scan(input interface{}) error + func (s StringArray) Value() (driver.Value, error) + type SummaryResult struct + BuildTime string + CanExport bool + CategoryCount int64 + LatestPosts []*RenderContent + MediaCount int64 + PageCount int64 + PostCount int64 + SiteCount int64 + func GetSummary(db *gorm.DB) (result SummaryResult) + type TagsForm struct + CategoryId string + CategoryPath string + SiteId string + type User struct + Activated bool + AuthToken string + CreatedAt time.Time + DisplayName string + Email string + Enabled bool + FirstName string + ID uint + IsStaff bool + IsSuperUser bool + LastLogin *time.Time + LastLoginIP string + LastName string + Locale string + Password string + Phone string + Profile *Profile + Source string + Timezone string + UpdatedAt time.Time + func (*User) TableName() string + func (u *User) GetProfile() Profile + func (u *User) GetVisibleName() string + func (u User) String() string