warden

package
v0.7.21 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserEmailNotFound = errors.New("user email not found")
	ErrTeamUUIDNotFound  = errors.New("team with uuid not found")
	ErrNon200            = errors.New("got non-200 when hitting warden API")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	Client  *http.Client
}

func NewClient

func NewClient(baseURL string) *Client

func (*Client) ListUserTeams

func (c *Client) ListUserTeams(ctx context.Context, req TeamListRequest) ([]Team, error)

func (*Client) TeamByUUID

func (c *Client) TeamByUUID(ctx context.Context, req TeamByUUIDRequest) (*Team, error)

type Team

type Team struct {
	Name                 string    `json:"name"`
	CreatedAt            time.Time `json:"created_at"`
	UpdatedAt            time.Time `json:"updated_at"`
	OwnerID              int       `json:"owner_id"`
	ParentTeamIdentifier string    `json:"parent_team_identifier"`
	Identifier           string    `json:"identifier"`
	ProductGroupName     string    `json:"product_group_name"`
	ProductGroupID       string    `json:"product_group_id"`
	Labels               any       `json:"labels"`
	ShortCode            string    `json:"short_code"`
}

type TeamByUUIDRequest

type TeamByUUIDRequest struct {
	TeamUUID string
}

type TeamListRequest

type TeamListRequest struct {
	Email string
}

Jump to

Keyboard shortcuts

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