api

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*tfeapi.Responder
	Client apiClient
}

func (*API) AddHandlers

func (a *API) AddHandlers(r *mux.Router)

type Client

type Client struct {
	*otfhttp.Client
}

func (*Client) AddTeamMembership

func (c *Client) AddTeamMembership(ctx context.Context, teamID resource.TfeID, usernames []user.Username) error

AddTeamMembership adds users to a team via HTTP.

func (*Client) Create

func (c *Client) Create(ctx context.Context, username string, _ ...user.NewUserOption) (*user.User, error)

Create creates a user via HTTP/JSONAPI. Options are ignored.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, username user.Username) error

Delete deletes a user via HTTP/JSONAPI.

func (*Client) RemoveTeamMembership

func (c *Client) RemoveTeamMembership(ctx context.Context, teamID resource.TfeID, usernames []user.Username) error

RemoveTeamMembership removes users from a team via HTTP.

type TFEAPI

type TFEAPI struct {
	*tfeapi.Responder
	Client tfeClient
}

func NewTFEAPI

func NewTFEAPI(client tfeClient, responder *tfeapi.Responder) *TFEAPI

func (*TFEAPI) AddHandlers

func (a *TFEAPI) AddHandlers(r *mux.Router)

type UserClient

type UserClient = Client

Alias client to permit embedding it with other clients in a struct without a name clash.

Jump to

Keyboard shortcuts

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