controlplanepermission

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyParameters

type ApplyParameters struct {

	// AccountName is the name of the account to which the team belongs.
	AccountName string `json:"-"`

	// TeamID is the ID of the team to which the permission applies.
	TeamID string `json:"-"`

	// ControlPlaneName is the name of the control plane to which the permission
	// applies.
	ControlPlaneName string `json:"-"`

	// Permission is the permission to grant to the team for a control plane.
	// Valid values are "editor", "viewer", and "owner".
	Permission string `json:"permission"`
}

type Client

type Client struct {
	*up.Config
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *up.Config) *Client

func (*Client) Apply

func (c *Client) Apply(ctx context.Context, params *ApplyParameters) error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, params *DeleteParameters) error

func (*Client) Get

func (c *Client) Get(ctx context.Context, params *GetParameters) (*PermissionResponse, error)

type DeleteParameters

type DeleteParameters struct {
	// AccountName is the name of the account to which the team belongs.
	AccountName string `json:"-"`

	// TeamID is the ID of the team to which the permission applies.
	TeamID string `json:"-"`

	// ControlPlaneName is the name of the control plane to which the permission
	// applies.
	ControlPlaneName string `json:"-"`
}

type GetParameters

type GetParameters struct {
	// AccountName is the name of the account to which the team belongs.
	AccountName string `json:"-"`

	// TeamID is the ID of the team to which the permission applies.
	TeamID string `json:"-"`
}

type GetResponse

type GetResponse struct {
	Permissions []PermissionResponse `json:"permissions"`
	Size        int                  `json:"size"`
	Page        int                  `json:"page"`
	Count       int                  `json:"count"`
}

type PermissionResponse

type PermissionResponse struct {
	ControlPlaneName string `json:"controlPlaneName"`

	ControlPlaneID string     `json:"controlPlaneId"`
	TeamID         string     `json:"teamId"`
	AccountID      uint       `json:"accountId"`
	Privilege      string     `json:"privilege"`
	CreatorID      uint       `json:"creatorId"`
	CreatedAt      *time.Time `json:"createdAt"`
	UpdatedAt      *time.Time `json:"updatedAt"`
	DeletedAt      *time.Time `json:"deletedAt"`
}

Jump to

Keyboard shortcuts

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