Documentation
¶
Index ¶
- Variables
- func ConvertUnixTimeToTime(unix interface{}) *time.Time
- type Article
- type ArticleByArticleKeyInput
- type ArticleByKeyOpts
- type ArticleConnection
- type ArticleEdge
- type ArticleForDB
- type ArticlePaginationInput
- type Blog
- type BlogByBlogKeyInput
- type BlogByKeyOpts
- type BlogForDB
- type BlogLink
- type BlogLinkInput
- type Config
- type ConfigForDB
- type Connection
- type CreateArticleInput
- type CreateBlogInput
- type Edge
- type LoginInput
- type MasterParameter
- type Node
- type PageInfo
- type ProviderUserForDB
- type PublishOption
- type PublishOptionAndPasswordUpdatedAt
- type QueryArgs
- type Role
- type UpdateArticleInput
- type UpdateBlogInput
- type UpdateBlogLinkInput
- type UpdateConfigInput
- type UpdateUserInput
- type UserForDB
- type UserInfoByToken
Constants ¶
This section is empty.
Variables ¶
View Source
var AllPublishOption = []PublishOption{ PublishOptionPublic, PublishOptionPassword, PublishOptionPrivate, }
View Source
var AllRole = []Role{ RoleAdmin, RoleUser, }
Functions ¶
func ConvertUnixTimeToTime ¶
Types ¶
type Article ¶
type ArticleByKeyOpts ¶
type ArticleConnection ¶
type ArticleConnection struct { PageInfo *PageInfo `json:"pageInfo"` Edges []*ArticleEdge `json:"edges"` XJwtToken *string `json:"xJwtToken"` }
func (ArticleConnection) GetEdges ¶
func (this ArticleConnection) GetEdges() []Edge
func (ArticleConnection) GetPageInfo ¶
func (this ArticleConnection) GetPageInfo() *PageInfo
func (ArticleConnection) IsConnection ¶
func (ArticleConnection) IsConnection()
type ArticleEdge ¶
func (ArticleEdge) GetCursor ¶
func (this ArticleEdge) GetCursor() string
func (ArticleEdge) GetNode ¶
func (this ArticleEdge) GetNode() Node
func (ArticleEdge) IsEdge ¶
func (ArticleEdge) IsEdge()
type ArticleForDB ¶
type ArticleForDB struct { ID string `json:"id"` ArticleKey string `json:"articleKey"` Content *string `json:"content"` PublishOption PublishOption `json:"publishOption"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` }
func (*ArticleForDB) ConvertArticleForDBToArticle ¶
func (afdb *ArticleForDB) ConvertArticleForDBToArticle() *Article
type ArticlePaginationInput ¶
type Blog ¶
type Blog struct { ID string `json:"id"` BlogKey string `json:"blogKey"` Author *string `json:"author"` Name *string `json:"name"` Description *string `json:"description"` PublishOption PublishOption `json:"publishOption"` PasswordHint string `json:"passwordHint"` Links []*BlogLink `json:"links"` CreatedAt *string `json:"createdAt"` UpdatedAt *string `json:"updatedAt"` XJwtToken *string `json:"xJwtToken"` }
type BlogByBlogKeyInput ¶
type BlogByKeyOpts ¶
type BlogForDB ¶
type BlogForDB struct { ID string `json:"id"` BlogKey string `json:"blogKey"` UserId int `json:"user"` Author *string `json:"author"` Name *string `json:"name"` Description *string `json:"description"` PublishOption PublishOption `json:"publishOption"` PasswordUpdatedAt time.Time `json:"passwordUpdatedAt"` PasswordHint string `json:"passwordHint"` Links *json.RawMessage `json:"links"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` }
func (*BlogForDB) ConvertBlogForDBToBlog ¶
type BlogLinkInput ¶
type ConfigForDB ¶
func (*ConfigForDB) ConvertConfigForDBToConfig ¶
func (cfdb *ConfigForDB) ConvertConfigForDBToConfig() *Config
type Connection ¶
type CreateArticleInput ¶
type CreateBlogInput ¶
type CreateBlogInput struct { Author string `json:"author"` Name string `json:"name"` Description *string `json:"description"` PublishOption PublishOption `json:"publishOption"` Password *string `json:"password"` PasswordHint *string `json:"passwordHint"` Links []*BlogLinkInput `json:"links"` }
type LoginInput ¶
type LoginInput struct {
Token string `json:"token"`
}
type MasterParameter ¶
type ProviderUserForDB ¶
type PublishOption ¶
type PublishOption string
const ( PublishOptionPublic PublishOption = "PUBLIC" PublishOptionPassword PublishOption = "PASSWORD" PublishOptionPrivate PublishOption = "PRIVATE" )
func (PublishOption) IsValid ¶
func (e PublishOption) IsValid() bool
func (PublishOption) MarshalGQL ¶
func (e PublishOption) MarshalGQL(w io.Writer)
func (PublishOption) String ¶
func (e PublishOption) String() string
func (*PublishOption) UnmarshalGQL ¶
func (e *PublishOption) UnmarshalGQL(v interface{}) error
type PublishOptionAndPasswordUpdatedAt ¶
type PublishOptionAndPasswordUpdatedAt struct { PublishOption PublishOption PasswordUpdatedAt time.Time }
type Role ¶
type Role string
func ConvertToRole ¶
func (Role) MarshalGQL ¶
func (*Role) UnmarshalGQL ¶
type UpdateArticleInput ¶
type UpdateBlogInput ¶
type UpdateBlogInput struct { ID string `json:"id"` Author *string `json:"author"` Name *string `json:"name"` Description *string `json:"description"` PublishOption *PublishOption `json:"publishOption"` Password *string `json:"password"` PasswordHint *string `json:"passwordHint"` Links []*UpdateBlogLinkInput `json:"links"` }
type UpdateBlogLinkInput ¶
type UpdateConfigInput ¶
type UpdateConfigInput struct {
AllowRegister *bool `json:"allowRegister"`
}
type UpdateUserInput ¶
Click to show internal directories.
Click to hide internal directories.