model

package
v0.0.0-...-5c9d85b Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type MarkAllMessagesResponse

type MarkAllMessagesResponse struct {
	MarkedMsgs []*MarkedMessage `json:"marked_msgs"`
}

type MarkOneMessageResponse

type MarkOneMessageResponse struct {
	MarkedMsgId string `json:"marked_msg_id"`
}

type MarkedMessage

type MarkedMessage struct {
	ID string `json:"id"`
}

type Message

type Message struct {
	ID       string           `json:"id"`
	Type     *string          `json:"type"`
	HasRead  *bool            `json:"has_read"`
	CreateAt *string          `json:"create_at"`
	Reply    *ReplyForMessage `json:"reply"`
	Topic    *TopicForMessage `json:"topic"`
	Author   *User            `json:"author"`
}

type MessagesResponse

type MessagesResponse struct {
	HasReadMessages    []*Message `json:"has_read_messages"`
	HasnotReadMessages []*Message `json:"hasnot_read_messages"`
}

type Reply

type Reply struct {
	ID       string    `json:"id"`
	Content  *string   `json:"content"`
	CreateAt *string   `json:"create_at"`
	ReplyID  *string   `json:"reply_id"`
	IsUped   *bool     `json:"is_uped"`
	Ups      []*string `json:"ups"`
	Author   *User     `json:"author"`
}

type ReplyForMessage

type ReplyForMessage struct {
	ID       *string   `json:"id"`
	Content  *string   `json:"content"`
	CreateAt *string   `json:"create_at"`
	Ups      []*string `json:"ups"`
}

type ReplyRecent

type ReplyRecent struct {
	ID          string  `json:"id"`
	Title       *string `json:"title"`
	LastReplyAt *string `json:"last_reply_at"`
	Author      *User   `json:"author"`
}

type Topic

type Topic struct {
	ID          string  `json:"id"`
	AuthorID    string  `json:"author_id"`
	Tab         *string `json:"tab"`
	Content     *string `json:"content"`
	Title       string  `json:"title"`
	LastReplyAt *string `json:"last_reply_at"`
	Good        *bool   `json:"good"`
	Top         *bool   `json:"top"`
	ReplyCount  *int    `json:"reply_count"`
	VisitCount  *int    `json:"visit_count"`
	CreateAt    *string `json:"create_at"`
	IsCollect   *bool   `json:"is_collect"`
	Author      *User   `json:"author"`
}

type TopicDetail

type TopicDetail struct {
	ID          string   `json:"id"`
	AuthorID    string   `json:"author_id"`
	Tab         *string  `json:"tab"`
	Content     *string  `json:"content"`
	Title       string   `json:"title"`
	LastReplyAt *string  `json:"last_reply_at"`
	Good        *bool    `json:"good"`
	Top         *bool    `json:"top"`
	ReplyCount  *int     `json:"reply_count"`
	VisitCount  *int     `json:"visit_count"`
	CreateAt    *string  `json:"create_at"`
	IsCollect   *bool    `json:"is_collect"`
	Replies     []*Reply `json:"replies"`
	Author      *User    `json:"author"`
}

type TopicForMessage

type TopicForMessage struct {
	ID          string  `json:"id"`
	Title       string  `json:"title"`
	LastReplyAt *string `json:"last_reply_at"`
}

type TopicRecent

type TopicRecent struct {
	ID          string  `json:"id"`
	Title       *string `json:"title"`
	LastReplyAt *string `json:"last_reply_at"`
	Author      *User   `json:"author"`
}

type TopicRequestParams

type TopicRequestParams struct {
	ID          string  `json:"id" url:"id,omitempty"`
	Accesstoken *string `json:"accesstoken" url:"accesstoken,omitempty"`
	Mdrender    *string `json:"mdrender" url:"mdrender,omitempty"`
}

type TopicTab

type TopicTab string
const (
	TopicTabAsk   TopicTab = "ask"
	TopicTabShare TopicTab = "share"
	TopicTabJob   TopicTab = "job"
	TopicTabGood  TopicTab = "good"
)

func (TopicTab) IsValid

func (e TopicTab) IsValid() bool

func (TopicTab) MarshalGQL

func (e TopicTab) MarshalGQL(w io.Writer)

func (TopicTab) String

func (e TopicTab) String() string

func (*TopicTab) UnmarshalGQL

func (e *TopicTab) UnmarshalGQL(v interface{}) error

type TopicsRequestParams

type TopicsRequestParams struct {
	Page     *int      `json:"page" url:"page,omitempty"`
	Tab      *TopicTab `json:"tab" url:"tab,omitempty"`
	Limit    *int      `json:"limit" url:"limit,omitempty"`
	Mdrender *string   `json:"mdrender" url:"mdrender,omitempty"`
}

type User

type User struct {
	Loginname *string `json:"loginname"`
	AvatarURL *string `json:"avatar_url"`
}

type UserDetail

type UserDetail struct {
	User
	GithubUsername *string        `json:"githubUsername"`
	CreateAt       *string        `json:"create_at"`
	Score          *int           `json:"score"`
	RecentReplies  []*ReplyRecent `json:"recent_replies"`
	RecentTopics   []*TopicRecent `json:"recent_topics"`
}

type UserEntity

type UserEntity struct {
	ID string `json:"id"`
	User
}

Jump to

Keyboard shortcuts

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