client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppResponse

type AppResponse struct {
	ID     string `json:"id"`
	Handle string `json:"handle"`
	Name   string `json:"name"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Get

func (client *Client) Get(url string) (*http.Response, error)

func (*Client) GetApp

func (client *Client) GetApp(teamId string, appId string) (AppResponse, error)

func (*Client) GetJSON

func (client *Client) GetJSON(url string, data interface{}) error

func (*Client) GetRegistryToken

func (client *Client) GetRegistryToken(team string) (string, error)

func (*Client) GetToken

func (client *Client) GetToken(code string) (string, error)

func (*Client) GetTokenURL

func (client *Client) GetTokenURL() (string, error)

func (*Client) GetUser

func (client *Client) GetUser() (UserResponse, error)

type RegistryTokenResponse

type RegistryTokenResponse struct {
	Token string `json:"token"`
}

type TeamResponse

type TeamResponse struct {
	ID     string `json:"id"`
	Handle string `json:"handle"`
	Name   string `json:"name"`
}

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

type UserResponse

type UserResponse struct {
	ID     string         `json:"id"`
	Name   string         `json:"name"`
	Handle string         `json:"handle"`
	Email  string         `json:"email"`
	Teams  []TeamResponse `json:"teams"`
}

Jump to

Keyboard shortcuts

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