models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// image bed code in use
	ImageBed ImageBedCode

	// An array with the same length as the
	// number of image beds
	AuthData [5]*LoginInfo
}

Config stores configuration information of all picture beds

func (Config) MarshalEasyJSON

func (v Config) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Config) MarshalJSON

func (v Config) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Config) UnmarshalEasyJSON

func (v *Config) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Config) UnmarshalJSON

func (v *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FileData

type FileData map[string]string

func (FileData) MarshalEasyJSON

func (v FileData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FileData) MarshalJSON

func (v FileData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FileData) UnmarshalEasyJSON

func (v *FileData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FileData) UnmarshalJSON

func (v *FileData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GithubOK

type GithubOK struct {
	Content struct {
		Sha         string
		DownloadURL string `json:"download_url"`
	}
}

func (GithubOK) MarshalEasyJSON

func (v GithubOK) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GithubOK) MarshalJSON

func (v GithubOK) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GithubOK) UnmarshalEasyJSON

func (v *GithubOK) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GithubOK) UnmarshalJSON

func (v *GithubOK) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ImageBedCode

type ImageBedCode int

func (ImageBedCode) String

func (ibc ImageBedCode) String() string

String returns the domain name of the image bed corresponding to the code

type LoginInfo

type LoginInfo struct {
	Token    string `json:"token,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Repo     string `json:"repo,omitempty"`
	Folder   string `json:"folder,omitempty"`
	Cookie   string `json:"cookie,omitempty"`
}

LoginInfo stores the authentication information of each image bed

func (LoginInfo) MarshalEasyJSON

func (v LoginInfo) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LoginInfo) MarshalJSON

func (v LoginInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LoginInfo) UnmarshalEasyJSON

func (v *LoginInfo) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LoginInfo) UnmarshalJSON

func (v *LoginInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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