schema

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePostRequest

type CreatePostRequest struct {
	Title       string
	Description string
	Publish     bool
	Files       []CreatePostRequestFile
}

type CreatePostRequestFile

type CreatePostRequestFile struct {
	Name string `json:"name"`
	File any    `json:"-"`
}

type CreatePostResponse

type CreatePostResponse struct {
	Post
}

type DeletePostRequest

type DeletePostRequest struct {
	ID int64 `json:"-"`
}

type DeletePostResponse

type DeletePostResponse struct {
	Post
}

type ObservePostRequest

type ObservePostRequest struct {
	ID        int64 `json:"-"`
	WithFiles bool  `json:"-"`
}

type ObservePostResponse

type ObservePostResponse struct {
	Post
}

type ObservePostsRequest

type ObservePostsRequest struct {
}

type ObservePostsResponse

type ObservePostsResponse struct {
	Posts       []Post `json:"posts"`
	NextBeginID int64  `json:"next_begin_id"`
}

type Post

type Post struct {
	ID          int64      `json:"id"`
	Title       string     `json:"title"`
	Description string     `json:"description,omitempty"`
	CreateTime  int64      `json:"create_time,omitempty"`
	PublishTime int64      `json:"publish_time,omitempty"`
	Permissions []string   `json:"permissions,omitempty"`
	Files       []PostFile `json:"files,omitempty"`
}

type PostFile

type PostFile struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type UpdatePostRequest

type UpdatePostRequest struct {
	ID          int64                   `json:"-"`
	Title       *string                 `json:"title"`
	Description *string                 `json:"description"`
	Publish     *bool                   `json:"publish"`
	Files       []UpdatePostRequestFile `json:"files"`
	DeleteFiles []int64                 `json:"delete_files"`
}

type UpdatePostRequestFile

type UpdatePostRequestFile = CreatePostRequestFile

type UpdatePostResponse

type UpdatePostResponse struct {
	Post
}

Jump to

Keyboard shortcuts

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