team

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package team implements the `team` commands.

Index

Constants

This section is empty.

Variables

View Source
var (
	ReadOnly       = []string{"version"}
	MemberReadOnly = []string{"name", "pictureUrl", "managedBy"}
)

The version is dropped as `service get` drops it. Members are sent back as the platform takes them, by username, email and role; the rest describes the user.

Functions

func AddEnvironments

func AddEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error

func AddMembers

func AddMembers(ctx context.Context, c *platform.Client, o MemberOptions) error

func Apply

func Apply(ctx context.Context, c *platform.Client, o ApplyOptions) error

Apply upserts teams by their key, which is what names a team; there is no id to write back. The id `get` writes is not sent: the platform goes by the key alone, and another platform's id in the file would only contradict it.

func Delete

func Delete(ctx context.Context, c *platform.Client, o DeleteOptions) error

func Get

func List

func ListEnvironments

func ListEnvironments(ctx context.Context, c *platform.Client, key, explicitType string) error

func ListMembers

func ListMembers(ctx context.Context, c *platform.Client, key, explicitType string) error

func RemoveEnvironments

func RemoveEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error

func RemoveMembers

func RemoveMembers(ctx context.Context, c *platform.Client, o MemberOptions) error

func SetEnvironments

func SetEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error

SetEnvironments replaces the environments a team may use.

func SetMembers

func SetMembers(ctx context.Context, c *platform.Client, o MemberOptions) error

SetMembers replaces the members: everyone not given is removed from the team.

Types

type ApplyOptions

type ApplyOptions struct {
	Files     []string
	Recursive bool
}

type DeleteOptions

type DeleteOptions struct {
	Key         string
	Experiments bool
	Yes         bool
}

type EnvironmentOptions

type EnvironmentOptions struct {
	Key          string
	Environments []string
	Validate     bool
	Yes          bool
}

type GetOptions

type GetOptions struct {
	Key, File, Type string
}

type ListOptions

type ListOptions struct {
	Search string
	Type   string
}

type MemberOptions

type MemberOptions struct {
	Key       string
	Usernames []string
	Emails    []string
	Role      string
	Validate  bool
	Yes       bool
}

MemberOptions names users by username or email; the platform takes either.

Jump to

Keyboard shortcuts

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