projectuser

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemberTypeChoices

func MemberTypeChoices() []string

Types

type GroupUserOut

type GroupUserOut struct {
	MemberType  MemberType `json:"member_type"`   // Project member type
	RealName    string     `json:"real_name"`     // User real name
	UserEmail   string     `json:"user_email"`    // User email address
	UserGroupId string     `json:"user_group_id"` // User group ID
}

type Handler

type Handler interface {
	// ProjectUserList list users with access to the project. May contain same user multiple times if they belong to multiple teams associated to the project
	// GET /v1/project/{project}/users
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserList
	ProjectUserList(ctx context.Context, project string) (*ProjectUserListOut, error)

	// ProjectUserRemove remove user from the project
	// DELETE /v1/project/{project}/user/{user_email}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserRemove
	ProjectUserRemove(ctx context.Context, project string, userEmail string) error

	// ProjectUserUpdate update a project user
	// PUT /v1/project/{project}/user/{user_email}
	// https://api.aiven.io/doc/#tag/Project/operation/ProjectUserUpdate
	ProjectUserUpdate(ctx context.Context, project string, userEmail string, in *ProjectUserUpdateIn) error
}

type InvitationOut

type InvitationOut struct {
	InviteTime        time.Time  `json:"invite_time"`         // Timestamp in ISO 8601 format, always in UTC
	InvitedUserEmail  string     `json:"invited_user_email"`  // User email address
	InvitingUserEmail string     `json:"inviting_user_email"` // User email address
	MemberType        MemberType `json:"member_type"`         // Project member type
}

type MemberType

type MemberType string
const (
	MemberTypeAdmin     MemberType = "admin"
	MemberTypeDeveloper MemberType = "developer"
	MemberTypeOperator  MemberType = "operator"
	MemberTypeReadOnly  MemberType = "read_only"
)

type ProjectUserHandler

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

func NewHandler

func NewHandler(doer doer) ProjectUserHandler

func (*ProjectUserHandler) ProjectUserList

func (h *ProjectUserHandler) ProjectUserList(ctx context.Context, project string) (*ProjectUserListOut, error)

func (*ProjectUserHandler) ProjectUserRemove

func (h *ProjectUserHandler) ProjectUserRemove(ctx context.Context, project string, userEmail string) error

func (*ProjectUserHandler) ProjectUserUpdate

func (h *ProjectUserHandler) ProjectUserUpdate(ctx context.Context, project string, userEmail string, in *ProjectUserUpdateIn) error

type ProjectUserListOut

type ProjectUserListOut struct {
	GroupUsers  []GroupUserOut  `json:"group_users"` // List of users in groups that have access to the project
	Invitations []InvitationOut `json:"invitations"` // List of pending invitations
	Users       []UserOut       `json:"users"`       // List of project's users
}

ProjectUserListOut ProjectUserListResponse

type ProjectUserUpdateIn

type ProjectUserUpdateIn struct {
	MemberType MemberType `json:"member_type"` // Project member type
}

ProjectUserUpdateIn ProjectUserUpdateRequestBody

type UserOut

type UserOut struct {
	Auth           []string   `json:"auth"`                // List of user's required authentication methods
	BillingContact bool       `json:"billing_contact"`     // Set for project's billing contacts
	CreateTime     time.Time  `json:"create_time"`         // Timestamp in ISO 8601 format, always in UTC
	MemberType     MemberType `json:"member_type"`         // Project member type
	RealName       *string    `json:"real_name,omitempty"` // User real name
	TeamId         string     `json:"team_id"`             // Team ID
	TeamName       string     `json:"team_name"`           // Team name
	UserEmail      string     `json:"user_email"`          // User email address
}

Jump to

Keyboard shortcuts

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