Documentation
¶
Overview ¶
Package team implements the `team` commands.
Index ¶
- Variables
- func AddEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error
- func AddMembers(ctx context.Context, c *platform.Client, o MemberOptions) error
- func Apply(ctx context.Context, c *platform.Client, o ApplyOptions) error
- func Delete(ctx context.Context, c *platform.Client, o DeleteOptions) error
- func Get(ctx context.Context, c *platform.Client, o GetOptions) error
- func List(ctx context.Context, c *platform.Client, o ListOptions) error
- func ListEnvironments(ctx context.Context, c *platform.Client, key, explicitType string) error
- func ListMembers(ctx context.Context, c *platform.Client, key, explicitType string) error
- func NoteAlwaysAllowed(file string, doc *jsyaml.Map)
- func RemoveEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error
- func RemoveMembers(ctx context.Context, c *platform.Client, o MemberOptions) error
- func SetEnvironments(ctx context.Context, c *platform.Client, o EnvironmentOptions) error
- func SetMembers(ctx context.Context, c *platform.Client, o MemberOptions) error
- func WarnSkippedMembers(file string, doc *jsyaml.Map, saved []byte)
- type ApplyOptions
- type DeleteOptions
- type EnvironmentOptions
- type GetOptions
- type ListOptions
- type MemberOptions
Constants ¶
This section is empty.
Variables ¶
var ( ReadOnly = []string{"version"} MemberReadOnly = []string{"name", "pictureUrl", "managedBy"} MemberKeys = []string{"username", "email"} )
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. Either the username or the email names the member.
var AlwaysAllowed = []string{"wait", "service-validation"}
AlwaysAllowed are the actions every team may use. The platform adds them to whatever list of allowed actions it is sent, so a team never has none.
Functions ¶
func AddEnvironments ¶
func AddMembers ¶
func Apply ¶
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 ListEnvironments ¶
func ListMembers ¶
func NoteAlwaysAllowed ¶ added in v6.5.0
NoteAlwaysAllowed tells, on stderr, when a file's allowed actions leave out actions the platform allows every team anyway, so that `allowedActions: []` is not read as a team that may run nothing.
func RemoveEnvironments ¶
func RemoveMembers ¶
func SetEnvironments ¶
SetEnvironments replaces the environments a team may use.
func SetMembers ¶
SetMembers replaces the members: everyone not given is removed from the team.
func WarnSkippedMembers ¶ added in v6.5.0
WarnSkippedMembers tells, on stderr, about each member of a file the platform left out of the team it saved: by default it skips usernames and emails that are no user of the tenant. It goes by the username where the file gives one and by the email otherwise, as the platform does. Emails compare regardless of case: the platform stores them in lower case, and a capitalised email it failed to find is missing from the team anyway.
Types ¶
type ApplyOptions ¶
type DeleteOptions ¶
type EnvironmentOptions ¶
type GetOptions ¶
type GetOptions struct {
Key, File, Type string
}