Documentation
¶
Index ¶
- Constants
- type Client
- func (t *Client) Api(path string) string
- func (t *Client) Delete(ctx context.Context, path string) error
- func (t *Client) Get(ctx context.Context, path string) (string, error)
- func (t *Client) GetCdnUrl(path string) string
- func (t *Client) GetContent(ctx context.Context, path string) string
- func (t *Client) GetLastVersion(ctx context.Context) string
- func (t *Client) Request(ctx context.Context, method string, url string, data string) (string, error)
- func (t *Client) Response(resp string) (string, error)
- func (t *Client) Sha(ctx context.Context, path string) string
- func (t *Client) Update(ctx context.Context, path string, content string, messages ...string) error
Constants ¶
View Source
const ( ApiURL = "https://api.github.com/repos/%s/%s/contents/%s" TagURL = "https://api.github.com/repos/%s/%s/tags" CdnURL = "https://cdn.jsdelivr.net/gh/%s/%s/%s" DefaultMessage = "operate by brick" )
Client https://docs.github.com/cn/rest/reference/repos#contents
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Repo string `json:"repo" `
Owner string `json:"owner"`
Email string `json:"email"`
AccessToken string `json:"access_token"`
}
Client ...
func (*Client) GetContent ¶
GetContent ...
func (*Client) GetLastVersion ¶
GetLastVersion 获取应用最后版本号
Click to show internal directories.
Click to hide internal directories.