accountteam

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TeamTypeChoices

func TeamTypeChoices() []string

Types

type AccountInviteOut

type AccountInviteOut struct {
	AccountId          string    `json:"account_id"`
	AccountName        string    `json:"account_name"`
	CreateTime         time.Time `json:"create_time"`
	InvitedByUserEmail string    `json:"invited_by_user_email"`
	TeamId             string    `json:"team_id"`
	TeamName           string    `json:"team_name"`
	UserEmail          string    `json:"user_email"`
}

type AccountTeamGetOut

type AccountTeamGetOut struct {
	AccountId  string     `json:"account_id,omitempty"`
	CreateTime *time.Time `json:"create_time,omitempty"`
	TeamId     string     `json:"team_id"`
	TeamName   string     `json:"team_name"`
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

type AccountTeamHandler

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

func NewHandler

func NewHandler(doer doer) AccountTeamHandler

func (*AccountTeamHandler) AccountTeamDelete

func (h *AccountTeamHandler) AccountTeamDelete(ctx context.Context, accountId string, teamId string) error

func (*AccountTeamHandler) AccountTeamGet

func (h *AccountTeamHandler) AccountTeamGet(ctx context.Context, accountId string, teamId string) (*AccountTeamGetOut, error)

func (*AccountTeamHandler) AccountTeamInvitesList

func (h *AccountTeamHandler) AccountTeamInvitesList(ctx context.Context, accountId string, teamId string) ([]AccountInviteOut, error)

func (*AccountTeamHandler) AccountTeamList

func (h *AccountTeamHandler) AccountTeamList(ctx context.Context, accountId string) ([]TeamOut, error)

func (*AccountTeamHandler) AccountTeamProjectAssociate

func (h *AccountTeamHandler) AccountTeamProjectAssociate(ctx context.Context, accountId string, teamId string, project string, in *AccountTeamProjectAssociateIn) error

func (*AccountTeamHandler) AccountTeamProjectDisassociate

func (h *AccountTeamHandler) AccountTeamProjectDisassociate(ctx context.Context, accountId string, teamId string, project string) error

func (*AccountTeamHandler) AccountTeamUpdate

func (h *AccountTeamHandler) AccountTeamUpdate(ctx context.Context, accountId string, teamId string, in *AccountTeamUpdateIn) (*AccountTeamUpdateOut, error)

type AccountTeamProjectAssociateIn

type AccountTeamProjectAssociateIn struct {
	TeamType TeamType `json:"team_type"`
}

type AccountTeamUpdateIn

type AccountTeamUpdateIn struct {
	TeamName string `json:"team_name"`
}

type AccountTeamUpdateOut

type AccountTeamUpdateOut struct {
	AccountId  string     `json:"account_id,omitempty"`
	CreateTime *time.Time `json:"create_time,omitempty"`
	TeamId     string     `json:"team_id"`
	TeamName   string     `json:"team_name"`
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

type Handler

type Handler interface {
	// AccountTeamDelete delete a team
	// DELETE /account/{account_id}/team/{team_id}
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamDelete
	AccountTeamDelete(ctx context.Context, accountId string, teamId string) error

	// AccountTeamGet get details for a single team
	// GET /account/{account_id}/team/{team_id}
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamGet
	AccountTeamGet(ctx context.Context, accountId string, teamId string) (*AccountTeamGetOut, error)

	// AccountTeamInvitesList list pending invites
	// GET /account/{account_id}/team/{team_id}/invites
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamInvitesList
	AccountTeamInvitesList(ctx context.Context, accountId string, teamId string) ([]AccountInviteOut, error)

	// AccountTeamList list teams belonging to an account
	// GET /account/{account_id}/teams
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamList
	AccountTeamList(ctx context.Context, accountId string) ([]TeamOut, error)

	// AccountTeamProjectAssociate associate team to a project
	// POST /account/{account_id}/team/{team_id}/project/{project}
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamProjectAssociate
	AccountTeamProjectAssociate(ctx context.Context, accountId string, teamId string, project string, in *AccountTeamProjectAssociateIn) error

	// AccountTeamProjectDisassociate disassociate team from a project
	// DELETE /account/{account_id}/team/{team_id}/project/{project}
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamProjectDisassociate
	AccountTeamProjectDisassociate(ctx context.Context, accountId string, teamId string, project string) error

	// AccountTeamUpdate update team details
	// PUT /account/{account_id}/team/{team_id}
	// https://api.aiven.io/doc/#tag/Account/operation/AccountTeamUpdate
	AccountTeamUpdate(ctx context.Context, accountId string, teamId string, in *AccountTeamUpdateIn) (*AccountTeamUpdateOut, error)
}

type TeamOut

type TeamOut struct {
	AccountId  string     `json:"account_id,omitempty"`
	CreateTime *time.Time `json:"create_time,omitempty"`
	TeamId     string     `json:"team_id"`
	TeamName   string     `json:"team_name"`
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

type TeamType

type TeamType string
const (
	TeamTypeAdmin     TeamType = "admin"
	TeamTypeOperator  TeamType = "operator"
	TeamTypeDeveloper TeamType = "developer"
	TeamTypeReadOnly  TeamType = "read_only"
)

Jump to

Keyboard shortcuts

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