Documentation
¶
Index ¶
- type GiteaTokenClient
- func (g *GiteaTokenClient) GetBaseUrl() string
- func (g *GiteaTokenClient) GetUsername() string
- func (g *GiteaTokenClient) GiteaClient() *gitea.Client
- func (g *GiteaTokenClient) IsDebug() bool
- func (g *GiteaTokenClient) NewClient(url, accessToken string, httpClient *http.Client) error
- func (g *GiteaTokenClient) NewClientWithHttpTimeout(url, accessToken string, timeoutSecond uint, insecure bool) error
- func (g *GiteaTokenClient) SetBasicAuth(username, password string)
- func (g *GiteaTokenClient) SetDebug(debug bool)
- func (g *GiteaTokenClient) SetOTP(otp string)
- func (g *GiteaTokenClient) SetSudo(sudo string)
- type GiteaTokenClientFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GiteaTokenClient ¶
type GiteaTokenClient struct {
GiteaTokenClientFunc GiteaTokenClientFunc `json:"-"`
// contains filtered or unexported fields
}
func (*GiteaTokenClient) GetBaseUrl ¶
func (g *GiteaTokenClient) GetBaseUrl() string
GetBaseUrl returns the base URL of the Gitea instance
func (*GiteaTokenClient) GetUsername ¶
func (g *GiteaTokenClient) GetUsername() string
GetUsername returns the username by SetBasicAuth
func (*GiteaTokenClient) GiteaClient ¶
func (g *GiteaTokenClient) GiteaClient() *gitea.Client
GiteaClient returns the gitea.Client
func (*GiteaTokenClient) IsDebug ¶
func (g *GiteaTokenClient) IsDebug() bool
IsDebug returns the debug status
func (*GiteaTokenClient) NewClient ¶
func (g *GiteaTokenClient) NewClient(url, accessToken string, httpClient *http.Client) error
NewClient creates a new Gitea client This function is a wrapper around gitea.NewClient
func (*GiteaTokenClient) NewClientWithHttpTimeout ¶
func (g *GiteaTokenClient) NewClientWithHttpTimeout(url, accessToken string, timeoutSecond uint, insecure bool) error
NewClientWithHttpTimeout creates a new Gitea client with a timeout for the http client The timeout is in seconds, and the minimum is 30 seconds If insecure is true, the client will skip SSL verification This function is a wrapper around gitea.NewClient
func (*GiteaTokenClient) SetBasicAuth ¶
func (g *GiteaTokenClient) SetBasicAuth(username, password string)
SetBasicAuth sets the basic auth for the client from gitea.Client
func (*GiteaTokenClient) SetDebug ¶
func (g *GiteaTokenClient) SetDebug(debug bool)
SetDebug sets the debug status for the client from gitea.Client
func (*GiteaTokenClient) SetOTP ¶
func (g *GiteaTokenClient) SetOTP(otp string)
SetOTP sets the otp for the client from gitea.Client
func (*GiteaTokenClient) SetSudo ¶
func (g *GiteaTokenClient) SetSudo(sudo string)
SetSudo sets the sudo for the client from gitea.Client
type GiteaTokenClientFunc ¶
type GiteaTokenClientFunc interface {
NewClientWithHttpTimeout(url, accessToken string, timeoutSecond uint, insecure bool) error
NewClient(url, accessToken string, httpClient *http.Client) error
SetDebug(debug bool)
IsDebug() bool
SetOTP(otp string)
SetSudo(sudo string)
SetBasicAuth(username, password string)
GiteaClient() *gitea.Client
GetBaseUrl() string
GetUsername() string
}