Documentation
¶
Index ¶
- func MemberTypeChoices() []string
- type GroupUserOut
- type Handler
- type InvitationOut
- type MemberType
- type ProjectUserHandler
- func (h *ProjectUserHandler) ProjectUserList(ctx context.Context, project string) (*ProjectUserListOut, error)
- func (h *ProjectUserHandler) ProjectUserRemove(ctx context.Context, project string, userEmail string) error
- func (h *ProjectUserHandler) ProjectUserUpdate(ctx context.Context, project string, userEmail string, in *ProjectUserUpdateIn) error
- type ProjectUserListOut
- type ProjectUserUpdateIn
- type UserOut
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 (*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
}
Click to show internal directories.
Click to hide internal directories.