goretro

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Code generated by GoRetro; DO NOT EDIT.

Code generated by GoRetro; DO NOT EDIT.

Code generated by GoRetro; DO NOT EDIT.

Code generated by GoRetro; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthType

type AuthType string
const (
	AuthNone   AuthType = "none"
	AuthBasic  AuthType = "basic"
	AuthAPIKey AuthType = "api_key"
	AuthBearer AuthType = "bearer"
)

type CatFactsAPIClient

type CatFactsAPIClient struct {
	BaseURL        string
	HTTPClient     *http.Client
	AuthType       AuthType
	Username       string
	Password       string
	APIKey         string
	BearerToken    string
	CustomAuthFunc func() (string, error)
	CustomHeaders  map[string]string
	Timeout        time.Duration
	MaxRetries     int
}

func NewCatFactsAPIClient

func NewCatFactsAPIClient(baseURL string) *CatFactsAPIClient

func (*CatFactsAPIClient) AnimalFacts

func (c *CatFactsAPIClient) AnimalFacts(animal_type string) ([]cats.Fact, error)

func (*CatFactsAPIClient) Fact

func (c *CatFactsAPIClient) Fact(id string) (*cats.Fact, error)

func (*CatFactsAPIClient) Facts

func (c *CatFactsAPIClient) Facts() ([]cats.Fact, error)

func (*CatFactsAPIClient) SetAPIKeyAuth

func (c *CatFactsAPIClient) SetAPIKeyAuth(apiKey string)

func (*CatFactsAPIClient) SetBasicAuth

func (c *CatFactsAPIClient) SetBasicAuth(username, password string)

func (*CatFactsAPIClient) SetBearerAuth

func (c *CatFactsAPIClient) SetBearerAuth(token string)

func (*CatFactsAPIClient) SetCustomAuthFunc

func (c *CatFactsAPIClient) SetCustomAuthFunc(authFunc func() (string, error))

func (*CatFactsAPIClient) SetCustomHeader

func (c *CatFactsAPIClient) SetCustomHeader(key, value string)

type GithubApiClient

type GithubApiClient struct {
	BaseURL        string
	HTTPClient     *http.Client
	AuthType       AuthType
	Username       string
	Password       string
	APIKey         string
	BearerToken    string
	CustomAuthFunc func() (string, error)
	CustomHeaders  map[string]string
	Timeout        time.Duration
	MaxRetries     int
}

func NewGithubApiClient

func NewGithubApiClient(baseURL string) *GithubApiClient

func (*GithubApiClient) GetCommits

func (c *GithubApiClient) GetCommits(owner string, repo string, since string) ([]github.Commit, error)

func (*GithubApiClient) GetForks

func (c *GithubApiClient) GetForks(owner string, repo string) ([]github.Fork, error)

func (*GithubApiClient) GetIssues

func (c *GithubApiClient) GetIssues(owner string, repo string) ([]github.Issue, error)

func (*GithubApiClient) GetLanguages

func (c *GithubApiClient) GetLanguages(owner string, repo string) (*github.Language, error)

func (*GithubApiClient) GetRepositories

func (c *GithubApiClient) GetRepositories() ([]github.Repository, error)

func (*GithubApiClient) GetStargazers

func (c *GithubApiClient) GetStargazers(owner string, repo string) ([]github.Stargazer, error)

func (*GithubApiClient) GetTraffic

func (c *GithubApiClient) GetTraffic(owner string, repo string) (*github.Traffic, error)

func (*GithubApiClient) GetUser

func (c *GithubApiClient) GetUser() (*github.UserInfo, error)

func (*GithubApiClient) SetAPIKeyAuth

func (c *GithubApiClient) SetAPIKeyAuth(apiKey string)

func (*GithubApiClient) SetBasicAuth

func (c *GithubApiClient) SetBasicAuth(username, password string)

func (*GithubApiClient) SetBearerAuth

func (c *GithubApiClient) SetBearerAuth(token string)

func (*GithubApiClient) SetCustomAuthFunc

func (c *GithubApiClient) SetCustomAuthFunc(authFunc func() (string, error))

func (*GithubApiClient) SetCustomHeader

func (c *GithubApiClient) SetCustomHeader(key, value string)

type HttpAPIClient

type HttpAPIClient struct {
	BaseURL        string
	HTTPClient     *http.Client
	AuthType       AuthType
	Username       string
	Password       string
	APIKey         string
	BearerToken    string
	CustomAuthFunc func() (string, error)
	CustomHeaders  map[string]string
	Timeout        time.Duration
	MaxRetries     int
}

func NewHttpAPIClient

func NewHttpAPIClient(baseURL string) *HttpAPIClient

func (*HttpAPIClient) PostExample

func (c *HttpAPIClient) PostExample(input httpbin.PostInput) (*httpbin.PostValue, error)

func (*HttpAPIClient) SetAPIKeyAuth

func (c *HttpAPIClient) SetAPIKeyAuth(apiKey string)

func (*HttpAPIClient) SetBasicAuth

func (c *HttpAPIClient) SetBasicAuth(username, password string)

func (*HttpAPIClient) SetBearerAuth

func (c *HttpAPIClient) SetBearerAuth(token string)

func (*HttpAPIClient) SetCustomAuthFunc

func (c *HttpAPIClient) SetCustomAuthFunc(authFunc func() (string, error))

func (*HttpAPIClient) SetCustomHeader

func (c *HttpAPIClient) SetCustomHeader(key, value string)

Jump to

Keyboard shortcuts

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