Documentation ¶
Index ¶
- type Banner
- type BannerCreate
- type BannerId
- type BannerPaginationQuery
- type BannerUpdate
- type Category
- type CategoryCreate
- type CategoryId
- type CategoryPaginationQuery
- type CategoryTree
- type CategoryUpdate
- type Channel
- type ChannelCreate
- type ChannelId
- type ChannelPaginationQuery
- type ChannelUpdate
- type Comment
- type CommentCreate
- type CommentId
- type CommentPaginationQuery
- type CommentUpdate
- type File
- type FileId
- type FilePaginationQuery
- type FileUpdate
- type FileUpload
- type ModelId
- type Object
- type ObjectId
- type ObjectType
- type PaginationQuery
- type PaginationResult
- type Poll
- type PollCreate
- type PollId
- type PollPaginationQuery
- type PollUpdate
- type Post
- type PostCreate
- type PostId
- type PostPaginationQuery
- type PostUpdate
- type Subject
- type SubjectId
- type SubjectType
- type SystemUser
- type Tag
- type TagCreate
- type TagId
- type TagPaginationQuery
- type TagUpdate
- type User
- type UserChangeIdentity
- type UserChangePassword
- type UserCreate
- type UserId
- type UserPaginationQuery
- type UserUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BannerCreate ¶
type BannerPaginationQuery ¶
type BannerPaginationQuery struct {
*PaginationQuery
}
type BannerUpdate ¶
type CategoryCreate ¶
type CategoryCreate struct {
Name string `json:"name" xml:"name"`
}
type CategoryId ¶
type CategoryId = ModelId
type CategoryPaginationQuery ¶
type CategoryPaginationQuery struct {
*PaginationQuery
}
type CategoryTree ¶
type CategoryTree struct { *Category Categories []*CategoryTree `json:"categories" xml:"categories"` }
type CategoryUpdate ¶
type CategoryUpdate struct {
Name string `json:"name" xml:"name"`
}
type ChannelCreate ¶
type ChannelCreate struct {
Name string `json:"name" xml:"name"`
}
type ChannelPaginationQuery ¶
type ChannelPaginationQuery struct {
*PaginationQuery
}
type ChannelUpdate ¶
type ChannelUpdate struct {
Name string `json:"name" xml:"name"`
}
type CommentCreate ¶
type CommentCreate struct {
Content string `json:"content" xml:"content"`
}
type CommentPaginationQuery ¶
type CommentPaginationQuery struct {
*PaginationQuery
}
type CommentUpdate ¶
type CommentUpdate struct {
Content string `json:"content" xml:"content"`
}
type FilePaginationQuery ¶
type FilePaginationQuery struct {
*PaginationQuery
}
type FileUpdate ¶
type FileUpdate struct {
Name string `json:"name" xml:"name" validate:"required"`
}
type FileUpload ¶
type ModelId ¶
func NewModelId ¶
func NewModelId() *ModelId
type Object ¶
type Object interface { ObjectId() *ObjectId ObjectType() ObjectType }
type ObjectType ¶
type ObjectType string
type PaginationQuery ¶
type PaginationQuery struct { Limit int `query:"limit" validate:"gte=1,lte=100"` Start int `query:"start" validate:"gte=0"` Page int `query:"page" validate:"gte=1"` }
func (*PaginationQuery) Offset ¶
func (q *PaginationQuery) Offset() int
type PaginationResult ¶
type PaginationResult struct { Total int `json:"total" xml:"total"` Data interface{} `json:"data" xml:"data"` }
type PollCreate ¶
type PollCreate struct {
Title string `json:"title" xml:"title"`
}
type PollPaginationQuery ¶
type PollPaginationQuery struct {
*PaginationQuery
}
type PollUpdate ¶
type PollUpdate struct {
Title string `json:"title" xml:"title"`
}
type Post ¶
type Post struct { Id *PostId `json:"id" xml:"id"` Author interface{} `json:"author" xml:"author"` Title string `json:"title" xml:"title"` Description string `json:"description" xml:"description"` Content string `json:"content" xml:"content"` Status enums.PostStatus `json:"status" xml:"status"` Privacy enums.PostPrivacy `json:"privacy" xml:"privacy"` Picture *File `json:"picture" xml:"picture"` Video *File `json:"video" xml:"video"` Views int `json:"views" xml:"views"` Published *time.Time `json:"published" xml:"published"` Categories *PaginationResult `json:"categories" xml:"categories"` Tags *PaginationResult `json:"tags" xml:"tags"` Created *time.Time `json:"created" xml:"created"` Updated *time.Time `json:"updated" xml:"updated"` }
type PostCreate ¶
type PostCreate struct { Title string `json:"title" xml:"title"` Description string `json:"description" xml:"description"` Content string `json:"content" xml:"content"` Status enums.PostStatus `json:"status" xml:"status"` Privacy enums.PostPrivacy `json:"privacy" xml:"privacy"` Views int `json:"views" xml:"views"` Published *time.Time `json:"published" xml:"published"` }
type PostPaginationQuery ¶
type PostPaginationQuery struct { *PaginationQuery Status enums.PostStatus `query:"status"` Privacy enums.PostPrivacy `query:"privacy"` Author string `query:"author"` Term string `query:"term"` }
type PostUpdate ¶
type PostUpdate struct { Title string `json:"title" xml:"title" validate:"required"` Description string `json:"description" xml:"description"` Content string `json:"content" xml:"content" validate:"required"` Status enums.PostStatus `json:"status" xml:"status" validate:"required"` Privacy enums.PostPrivacy `json:"privacy" xml:"privacy" validate:"required"` Views int `json:"views" xml:"views"` Published *time.Time `json:"published" xml:"published"` }
type Subject ¶
type Subject interface { SubjectId() *SubjectId SubjectType() SubjectType }
type SubjectType ¶
type SubjectType string
const (
SystemSubjectType SubjectType = "system"
)
const (
UserSubjectType SubjectType = "user"
)
type SystemUser ¶
type SystemUser struct {
Id *SubjectId `json:"id" xml:"id"`
}
func NewSystemUser ¶
func NewSystemUser() *SystemUser
func (*SystemUser) SubjectId ¶
func (c *SystemUser) SubjectId() *SubjectId
func (*SystemUser) SubjectType ¶
func (*SystemUser) SubjectType() SubjectType
type TagPaginationQuery ¶
type TagPaginationQuery struct {
*PaginationQuery
}
type User ¶
type User struct { Id *UserId `json:"id" xml:"id"` FirstName string `json:"firstName" xml:"firstName"` LastName string `json:"lastName" xml:"lastName"` Email string `json:"email" xml:"email"` Picture *File `json:"picture" xml:"picture"` Verified bool `json:"verified" xml:"verified"` Created *time.Time `json:"created" xml:"created"` Updated *time.Time `json:"updated" xml:"updated"` }
func (*User) SubjectType ¶
func (*User) SubjectType() SubjectType
type UserChangeIdentity ¶
type UserChangeIdentity struct {
Email string `json:"email" xml:"email" validate:"required,email"`
}
type UserChangePassword ¶
type UserCreate ¶
type UserCreate struct { FirstName string `json:"firstName" xml:"firstName" validate:"required"` LastName string `json:"lastName" xml:"lastName" validate:"required"` Email string `json:"email" xml:"email" validate:"required,email"` Password string `json:"password" xml:"password" validate:"required"` }
type UserPaginationQuery ¶
type UserPaginationQuery struct {
*PaginationQuery
}
type UserUpdate ¶
Click to show internal directories.
Click to hide internal directories.