models

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	ContentUpdatedAt string     `json:"content_updated_at"`
	CreatedAt        string     `json:"created_at"`
	CreatorID        int        `json:"creator_id"`
	Description      string     `json:"description"`
	ID               int        `json:"id"`
	ItemsCount       int        `json:"items_count"`
	LikesCount       int        `json:"likes_count"`
	Name             string     `json:"name"`
	Namespace        string     `json:"namespace"`
	Public           int        `json:"public"`
	Slug             string     `json:"slug"`
	Type             string     `json:"type"`
	UpdatedAt        string     `json:"updated_at"`
	User             UserDetail `json:"user"`
	UserID           int        `json:"user_id"`
	WatchesCount     int        `json:"watches_count"`
}

type BookCreate

type BookCreate struct {
	Description string `json:"description"`
	Name        string `json:"name"`
	Namespace   string `json:"namespace"`
	Public      int    `json:"public"`
	Slug        string `json:"slug"`
	Type        string `json:"type"`
}

type BookToc

type BookToc struct {
	Title string `json:"title"`
	Slug  string `json:"slug"`
	Depth string `json:"depth"`
}

type Doc

type Doc struct {
	Book              interface{} `json:"book"`
	BookID            int         `json:"book_id"`
	CommentsCount     int         `json:"comments_count"`
	ContentUpdatedAt  string      `json:"content_updated_at"`
	Cover             interface{} `json:"cover"`
	CreatedAt         string      `json:"created_at"`
	CustomDescription interface{} `json:"custom_description"`
	Description       string      `json:"description"`
	DraftVersion      int         `json:"draft_version"`
	FirstPublishedAt  string      `json:"first_published_at"`
	Format            string      `json:"format"`
	ID                int         `json:"id"`
	LastEditor        struct {
		AvatarURL       string `json:"avatar_url"`
		CreatedAt       string `json:"created_at"`
		Description     string `json:"description"`
		FollowersCount  int    `json:"followers_count"`
		FollowingCount  int    `json:"following_count"`
		ID              int    `json:"id"`
		LargeAvatarURL  string `json:"large_avatar_url"`
		Login           string `json:"login"`
		MediumAvatarURL string `json:"medium_avatar_url"`
		Name            string `json:"name"`
		SmallAvatarURL  string `json:"small_avatar_url"`
		Type            string `json:"type"`
		UpdatedAt       string `json:"updated_at"`
	} `json:"last_editor"`
	LastEditorID int    `json:"last_editor_id"`
	LikesCount   int    `json:"likes_count"`
	Public       int    `json:"public"`
	PublishedAt  string `json:"published_at"`
	Slug         string `json:"slug"`
	Status       int    `json:"status"`
	Title        string `json:"title"`
	UpdatedAt    string `json:"updated_at"`
	UserID       int    `json:"user_id"`
	WordCount    int    `json:"word_count"`
}

type DocCreate

type DocCreate struct {
	Body   string `json:"body"`
	Format string `json:"format"`
	Public int    `json:"public"`
	Slug   string `json:"slug"`
	Title  string `json:"title"`
}

type Group

type Group struct {
	AvatarURL         string `json:"avatar_url"`
	BooksCount        int    `json:"books_count"`
	CreatedAt         string `json:"created_at"`
	Description       string `json:"description"`
	ID                int    `json:"id"`
	LargeAvatarURL    string `json:"large_avatar_url"`
	Login             string `json:"login"`
	MediumAvatarURL   string `json:"medium_avatar_url"`
	MembersCount      int    `json:"members_count"`
	Name              string `json:"name"`
	Public            int    `json:"public"`
	PublicBooksCount  int    `json:"public_books_count"`
	PublicTopicsCount int    `json:"public_topics_count"`
	SmallAvatarURL    string `json:"small_avatar_url"`
	TopicsCount       int    `json:"topics_count"`
	UpdatedAt         string `json:"updated_at"`
}

type GroupCreate

type GroupCreate struct {
	Name        string `json:"name"`
	Login       string `json:"login"`
	Description string `json:"description"`
}

type GroupDetail

type GroupDetail struct {
	AvatarURL         string `json:"avatar_url"`
	BooksCount        int    `json:"books_count"`
	CreatedAt         string `json:"created_at"`
	Description       string `json:"description"`
	ID                int    `json:"id"`
	LargeAvatarURL    string `json:"large_avatar_url"`
	Login             string `json:"login"`
	MediumAvatarURL   string `json:"medium_avatar_url"`
	MembersCount      int    `json:"members_count"`
	Name              string `json:"name"`
	OrganizationID    int    `json:"organization_id"`
	OwnerID           int    `json:"owner_id"`
	Public            int    `json:"public"`
	PublicBooksCount  int    `json:"public_books_count"`
	PublicTopicsCount int    `json:"public_topics_count"`
	SmallAvatarURL    string `json:"small_avatar_url"`
	SpaceID           int    `json:"space_id"`
	TopicsCount       int    `json:"topics_count"`
	UpdatedAt         string `json:"updated_at"`
}

type GroupUser

type GroupUser struct {
	CreatedAt string      `json:"created_at"`
	Group     interface{} `json:"group"`
	GroupID   int         `json:"group_id"`
	ID        int         `json:"id"`
	Role      int         `json:"role"`
	Status    int         `json:"status"`
	UpdatedAt string      `json:"updated_at"`
	User      UserDetail  `json:"user"`
	UserID    int         `json:"user_id"`
}

type Next

type Next struct {
	Title      string `json:"title"`
	Slug       string `json:"slug"`
	Serializer string `json:"_serializer"`
}

type Paper

type Paper struct {
	Prev struct {
		Title      string `json:"title"`
		Slug       string `json:"slug"`
		Serializer string `json:"_serializer"`
	} `json:"prev"`
	Next Next `json:"next"`
}
type Popular struct {
	ID          int         `json:"id"`
	SpaceID     int         `json:"space_id"`
	TargetType  string      `json:"target_type"`
	TargetID    int         `json:"target_id"`
	Title       string      `json:"title"`
	Description string      `json:"description"`
	Cover       string      `json:"cover"`
	Week        interface{} `json:"week"`
	CreatedAt   time.Time   `json:"created_at"`
	UpdatedAt   time.Time   `json:"updated_at"`
	Target      struct {
		ID         int         `json:"id"`
		Title      string      `json:"title"`
		Slug       string      `json:"slug"`
		UserID     int         `json:"user_id"`
		BookID     int         `json:"book_id"`
		LikesCount int         `json:"likes_count"`
		CreatedAt  time.Time   `json:"created_at"`
		UpdatedAt  time.Time   `json:"updated_at"`
		Book       Book        `json:"book"`
		LastEditor interface{} `json:"last_editor"`
		Share      interface{} `json:"share"`
		Serializer string      `json:"_serializer"`
	} `json:"target"`
}
type Search struct {
	CreatedAt   string `json:"created_at"`
	Description string `json:"description"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Namespace   string `json:"namespace"`
	Public      int    `json:"public"`
	Slug        string `json:"slug"`
	Type        string `json:"type"`
	UpdatedAt   string `json:"updated_at"`
	User        *User  `json:"user"`
	UserID      int    `json:"user_id"`
}

type User

type User struct {
	ID   int    `json:"id"`
	Type string `json:"type"`

	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	// contains filtered or unexported fields
}

一般在列表的场景返回的用户信息 doc https://www.yuque.com/yuque/developer/userserializer

type UserDetail

type UserDetail struct {
	AccountID        int    `json:"account_id"`
	AvatarURL        string `json:"avatar_url"`
	BooksCount       int    `json:"books_count"`
	CreatedAt        string `json:"created_at"`
	Description      string `json:"description"`
	FollowersCount   int    `json:"followers_count"`
	FollowingCount   int    `json:"following_count"`
	ID               int    `json:"id"`
	LargeAvatarURL   string `json:"large_avatar_url"`
	Login            string `json:"login"`
	MediumAvatarURL  string `json:"medium_avatar_url"`
	Name             string `json:"name"`
	Public           int    `json:"public"`
	PublicBooksCount int    `json:"public_books_count"`
	SmallAvatarURL   string `json:"small_avatar_url"`
	SpaceID          int    `json:"space_id"`
	Type             string `json:"type"`
	UpdatedAt        string `json:"updated_at"`
}

用户/团队详细信息 doc https://www.yuque.com/yuque/developer/userdetailserializer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL