assets

package
v0.0.0-...-7b27a3b Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StoreConfig

func StoreConfig(config *Config) error

Types

type Config

type Config struct {
	Plat string       `json:"plat"`
	Cfg  GithubConfig `json:"cfg"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type GithubConfig

type GithubConfig struct {
	Repo  string `json:"repo"`
	Token string `json:"token"`
}

type UploadResp

type UploadResp struct {
	Success bool   `json:"success"`
	Msg     string `json:"msg"`
	Url     string `json:"url"`
}

func ToUploadFail

func ToUploadFail(err error) UploadResp

func Upload

func Upload(config *Config, content string) UploadResp

Upload assets, the content is base64 encoded

Jump to

Keyboard shortcuts

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