esa

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

cf. https://docs.esa.io/posts/102

Index

Constants

View Source
const (
	MaxPerPage        = 50
	TagsMaxPerPage    = 1000
	SkipNoticeMessage = "[skip notice]"
)
View Source
const (
	Endpoint = "api.esa.io"
)

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

type Driver

type Driver interface {
	Get(string) (*model.Post, error)
	GetFromPageNum(int) (*model.Post, error)
	List(string, int, bool) ([]*model.Post, bool, error)
	Search(string, int) ([]*model.Post, bool, error)
	ListOrTagSearch(string, int, bool) ([]*model.Post, bool, error)
	Post(*model.NewPostBody, int, bool) (string, error)
	Move(*model.MovePostBody, int, bool) error
	MoveCategory(string, string) error
	Delete(int) error
	Tag(*model.TagPostBody, int, bool) error
	Comment(*model.NewCommentBody, int) (string, error)
	GetTags(int) (*model.Tags, bool, error)
	GetStats() (*model.Stats, error)
	Wip(*model.WipPostBody, int, bool) error
}

type DriverImpl

type DriverImpl struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(team string, token string, debug bool, version string) *DriverImpl

func (*DriverImpl) Comment

func (dri *DriverImpl) Comment(newCommentBody *model.NewCommentBody, postNum int) (string, error)

func (*DriverImpl) Delete

func (dri *DriverImpl) Delete(postNum int) error

func (*DriverImpl) Get

func (dri *DriverImpl) Get(path string) (*model.Post, error)

func (*DriverImpl) GetFromPageNum

func (dri *DriverImpl) GetFromPageNum(pageNum int) (*model.Post, error)

func (*DriverImpl) GetStats

func (dri *DriverImpl) GetStats() (*model.Stats, error)

func (*DriverImpl) GetTags

func (dri *DriverImpl) GetTags(pageNum int) (*model.Tags, bool, error)

func (*DriverImpl) List

func (dri *DriverImpl) List(path string, pageNum int, recursive bool) ([]*model.Post, bool, error)

func (*DriverImpl) ListOrTagSearch

func (dri *DriverImpl) ListOrTagSearch(path string, pageNum int, recursive bool) ([]*model.Post, bool, error)

func (*DriverImpl) Move

func (dri *DriverImpl) Move(movePostBody *model.MovePostBody, postNum int, notice bool) error

func (*DriverImpl) MoveCategory

func (dri *DriverImpl) MoveCategory(from string, to string) error

func (*DriverImpl) Post

func (dri *DriverImpl) Post(newPostBody *model.NewPostBody, postNum int, notice bool) (string, error)

func (*DriverImpl) Search

func (dri *DriverImpl) Search(queryString string, pageNum int) ([]*model.Post, bool, error)

func (*DriverImpl) Tag

func (dri *DriverImpl) Tag(tagPostBody *model.TagPostBody, postNum int, notice bool) error

func (*DriverImpl) Wip added in v1.4.0

func (dri *DriverImpl) Wip(wipPostBody *model.WipPostBody, postNum int, notice bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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