iam

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMember

func AddMember(ac *client.AlpaconClient, memberRequest MemberAddRequest) error

func CreateGroup

func CreateGroup(ac *client.AlpaconClient, groupRequest GroupCreateRequest) error

func CreateUser

func CreateUser(ac *client.AlpaconClient, userRequest UserCreateRequest) error

func DeleteGroup

func DeleteGroup(ac *client.AlpaconClient, groupName string) error

func DeleteMember

func DeleteMember(ac *client.AlpaconClient, memberDeleteRequest MemberDeleteRequest) error

func DeleteUser

func DeleteUser(ac *client.AlpaconClient, userName string) error

func GetGroupDetail

func GetGroupDetail(ac *client.AlpaconClient, groupId string) ([]byte, error)

func GetGroupIDByName

func GetGroupIDByName(ac *client.AlpaconClient, groupName string) (string, error)

func GetUserDetail

func GetUserDetail(ac *client.AlpaconClient, userId string) ([]byte, error)

func GetUserIDByName

func GetUserIDByName(ac *client.AlpaconClient, userName string) (string, error)

func GetUserNameByID

func GetUserNameByID(ac *client.AlpaconClient, userID string) (string, error)

func UpdateUser

func UpdateUser(ac *client.AlpaconClient, userName string) ([]byte, error)

Types

type GroupAttributes

type GroupAttributes struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	Tags        string `json:"tags"`
	Members     int    `json:"members"`
	Servers     int    `json:"servers"`
	GID         int    `json:"gid"`
	LDAPStatus  string `json:"ldap_status"`
}

func GetGroupList

func GetGroupList(ac *client.AlpaconClient) ([]GroupAttributes, error)

type GroupCreateRequest

type GroupCreateRequest struct {
	Name        string   `json:"name"`
	DisplayName string   `json:"display_name"`
	Tags        string   `json:"tags"`
	Description string   `json:"description"`
	IsLdapGroup bool     `json:"is_ldap_group"`
	Servers     []string `json:"servers"`
}

type GroupResponse

type GroupResponse struct {
	ID           string   `json:"id"`
	Name         string   `json:"name"`
	DisplayName  string   `json:"display_name"`
	Tags         string   `json:"tags"`
	NumMembers   int      `json:"num_members"`
	GID          int      `json:"gid"`
	IsLDAPGroup  bool     `json:"is_ldap_group"`
	Servers      []string `json:"servers"`
	ServersNames []string `json:"servers_names"`
}

type MemberAddRequest

type MemberAddRequest struct {
	Group string `json:"group"`
	User  string `json:"user"`
	Role  string `json:"role"`
}

type MemberDeleteRequest

type MemberDeleteRequest struct {
	Group string `json:"group"`
	User  string `json:"user"`
}

type MemberDetailResponse

type MemberDetailResponse struct {
	ID        string `json:"id"`
	Group     string `json:"group"`
	GroupName string `json:"group_name"`
	User      string `json:"user"`
	UserName  string `json:"user_name"`
	Role      string `json:"role"`
}

type UserAttributes

type UserAttributes struct {
	Username   string `json:"username"`
	Name       string `json:"name"`
	Email      string `json:"email"`
	Tags       string `json:"tags"`
	Groups     int    `json:"groups"`
	UID        int    `json:"uid"`
	Status     string `json:"status"`
	LDAPStatus string `json:"ldap_status"`
}

func GetUserList

func GetUserList(ac *client.AlpaconClient) ([]UserAttributes, error)

type UserCreateRequest

type UserCreateRequest struct {
	Username    string `json:"username"`
	Password    string `json:"password"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name"`
	Email       string `json:"email"`
	Phone       string `json:"phone"`
	Tags        string `json:"tags"`
	Description string `json:"description"`
	Shell       string `json:"shell"`
	IsActive    bool   `json:"is_active"`
	IsStaff     bool   `json:"is_staff"`
	IsSuperuser bool   `json:"is_superuser"`
	IsLdapUser  bool   `json:"is_ldap_user"`
}

type UserDetailAttributes

type UserDetailAttributes struct {
	Username      string   `json:"username"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	Email         string   `json:"email"`
	Phone         string   `json:"phone"`
	UID           int      `json:"uid"`
	Shell         string   `json:"shell"`
	HomeDirectory string   `json:"home_directory"`
	NumGroups     int      `json:"num_groups"`
	Groups        []string `json:"groups"`
	Tags          string   `json:"tags"`
	Status        string   `json:"status"`
	LDAPStatus    string   `json:"ldap_status"`
}

type UserResponse

type UserResponse struct {
	ID          string    `json:"id"`
	Username    string    `json:"username"`
	FirstName   string    `json:"first_name"`
	LastName    string    `json:"last_name"`
	Email       string    `json:"email"`
	Phone       string    `json:"phone"`
	Tags        string    `json:"tags"`
	NumGroups   int       `json:"num_groups"`
	UID         int       `json:"uid"`
	IsActive    bool      `json:"is_active"`
	IsStaff     bool      `json:"is_staff"`
	IsSuperuser bool      `json:"is_superuser"`
	IsLDAPUser  bool      `json:"is_ldap_user"`
	DateJoined  time.Time `json:"date_joined"`
}

type UserSummary added in v0.4.4

type UserSummary struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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