client

package
v0.26.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarmotClient

type MarmotClient struct {
	NodeName string
}

func NewMarmot

func NewMarmot(nodeName string, etcdUrl string) (*MarmotClient, error)

type MarmotEndpoint

type MarmotEndpoint struct {
	Scheme                string // Scheme for the endpoint, e.g., "http" or "https".
	HostPort              string
	BasePath              string // Base path for the API, e.g., "/api/v1".
	InsecureSkipTLSVerify bool
	AccessToken           string
	Client                *http.Client // Specialized client.
}

func NewMarmotdEp

func NewMarmotdEp(schame string, address string, basePath string, timeout int, insecureSkipTLSVerify bool) (*MarmotEndpoint, error)

func (*MarmotEndpoint) AddUserRole added in v0.25.0

func (m *MarmotEndpoint) AddUserRole(userID string, roleName string) error

func (*MarmotEndpoint) AuthLogin added in v0.25.0

func (m *MarmotEndpoint) AuthLogin(userID, password string) (*api.AuthLoginResponse, error)

func (*MarmotEndpoint) AuthLogout added in v0.25.0

func (m *MarmotEndpoint) AuthLogout() error

func (*MarmotEndpoint) AuthMe added in v0.25.0

func (m *MarmotEndpoint) AuthMe() (*api.AuthMe, error)

func (*MarmotEndpoint) AuthzCheck added in v0.25.0

func (m *MarmotEndpoint) AuthzCheck(request api.AuthzCheckRequest) (*api.AuthzCheckResponse, error)

func (*MarmotEndpoint) ChangeUserPassword added in v0.25.0

func (m *MarmotEndpoint) ChangeUserPassword(userID string, request api.PasswordChangeRequest) error

func (*MarmotEndpoint) CreateGateway added in v0.16.0

func (m *MarmotEndpoint) CreateGateway(spec api.Gateway) ([]byte, *url.URL, error)

CreateGateway creates a gateway resource.

func (*MarmotEndpoint) CreateImage added in v0.11.0

func (m *MarmotEndpoint) CreateImage(spec api.Image) ([]byte, *url.URL, error)

イメージの作成

func (*MarmotEndpoint) CreateLoadBalancer added in v0.19.0

func (m *MarmotEndpoint) CreateLoadBalancer(spec api.ApplicationLoadBalancer) ([]byte, *url.URL, error)

func (*MarmotEndpoint) CreateNetworkLoadBalancer added in v0.20.0

func (m *MarmotEndpoint) CreateNetworkLoadBalancer(spec api.NetworkLoadBalancer) ([]byte, *url.URL, error)

func (*MarmotEndpoint) CreateServer added in v0.9.1

func (m *MarmotEndpoint) CreateServer(spec api.Server) ([]byte, *url.URL, error)

サーバーの作成

func (*MarmotEndpoint) CreateUser added in v0.25.0

func (m *MarmotEndpoint) CreateUser(user api.User) (*api.User, error)

func (*MarmotEndpoint) CreateUserApiKey added in v0.25.0

func (m *MarmotEndpoint) CreateUserApiKey(userID string, request api.ApiKeyCreateRequest) (*api.ApiKey, string, error)

func (*MarmotEndpoint) CreateVirtualNetwork added in v0.11.0

func (m *MarmotEndpoint) CreateVirtualNetwork(spec api.VirtualNetwork) ([]byte, *url.URL, error)

仮想プライベートネットワークの作成

func (*MarmotEndpoint) CreateVolume added in v0.9.1

func (m *MarmotEndpoint) CreateVolume(spec api.Volume) ([]byte, *url.URL, error)

ボリュームの作成

func (*MarmotEndpoint) CreateVpnGateway added in v0.17.0

func (m *MarmotEndpoint) CreateVpnGateway(spec api.VpnGateway) ([]byte, *url.URL, error)

func (*MarmotEndpoint) DeleteGatewayById added in v0.16.0

func (m *MarmotEndpoint) DeleteGatewayById(id string) ([]byte, *url.URL, error)

DeleteGatewayById requests deletion for a gateway resource.

func (*MarmotEndpoint) DeleteImageById added in v0.11.0

func (m *MarmotEndpoint) DeleteImageById(key string) ([]byte, *url.URL, error)

イメージの削除

func (*MarmotEndpoint) DeleteLoadBalancerById added in v0.19.0

func (m *MarmotEndpoint) DeleteLoadBalancerById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) DeleteNetworkLoadBalancerById added in v0.20.0

func (m *MarmotEndpoint) DeleteNetworkLoadBalancerById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) DeleteServerById added in v0.9.1

func (m *MarmotEndpoint) DeleteServerById(id string) ([]byte, *url.URL, error)

サーバーの削除

func (*MarmotEndpoint) DeleteUserApiKey added in v0.25.0

func (m *MarmotEndpoint) DeleteUserApiKey(userID string, apiKeyID string) error

func (*MarmotEndpoint) DeleteUserById added in v0.25.0

func (m *MarmotEndpoint) DeleteUserById(userID string) error

func (*MarmotEndpoint) DeleteUserRole added in v0.25.0

func (m *MarmotEndpoint) DeleteUserRole(userID string, roleName string) error

func (*MarmotEndpoint) DeleteVirtualNetworkById added in v0.11.0

func (m *MarmotEndpoint) DeleteVirtualNetworkById(id string) ([]byte, *url.URL, error)

仮想プライベートネットワークの削除

func (*MarmotEndpoint) DeleteVolumeById added in v0.9.1

func (m *MarmotEndpoint) DeleteVolumeById(key string) ([]byte, *url.URL, error)

ボリュームの削除

func (*MarmotEndpoint) DeleteVpnGatewayById added in v0.17.0

func (m *MarmotEndpoint) DeleteVpnGatewayById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) DownloadImageQcow2ById added in v0.20.0

func (m *MarmotEndpoint) DownloadImageQcow2ById(key string) ([]byte, error)

イメージのQCOW2をダウンロードする

func (*MarmotEndpoint) GetGatewayById added in v0.16.0

func (m *MarmotEndpoint) GetGatewayById(id string) ([]byte, *url.URL, error)

GetGatewayById gets a gateway by ID.

func (*MarmotEndpoint) GetGatewayCertById added in v0.17.0

func (m *MarmotEndpoint) GetGatewayCertById(id string) ([]byte, *url.URL, error)

GetGatewayCertById downloads gateway cert profile as text/plain.

func (*MarmotEndpoint) GetGateways added in v0.16.0

func (m *MarmotEndpoint) GetGateways() ([]byte, *url.URL, error)

GetGateways gets all gateways.

func (*MarmotEndpoint) GetImages added in v0.11.0

func (m *MarmotEndpoint) GetImages() ([]byte, *url.URL, error)

イメージの一覧取得

func (*MarmotEndpoint) GetIpAddressesByNetworkId added in v0.11.4

func (m *MarmotEndpoint) GetIpAddressesByNetworkId(id string) ([]byte, *url.URL, error)

指定したIPネットワークに割り当てられたIPアドレスの一覧を取得

func (*MarmotEndpoint) GetIpNetworksByVirtualNetworkId added in v0.11.4

func (m *MarmotEndpoint) GetIpNetworksByVirtualNetworkId(id string) ([]byte, *url.URL, error)

指定した仮想ネットワークに割り当てられたIPネットワークの一覧を取得

func (*MarmotEndpoint) GetLoadBalancerById added in v0.19.0

func (m *MarmotEndpoint) GetLoadBalancerById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetLoadBalancers added in v0.19.0

func (m *MarmotEndpoint) GetLoadBalancers() ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetMarmotCluster added in v0.12.0

func (m *MarmotEndpoint) GetMarmotCluster() ([]byte, *url.URL, error)

クラスタ全体のホストステータスを取得

func (*MarmotEndpoint) GetMarmotStatus added in v0.11.6

func (m *MarmotEndpoint) GetMarmotStatus() ([]byte, *url.URL, error)

ホストのステータスを取得

func (*MarmotEndpoint) GetNetworkLoadBalancerById added in v0.20.0

func (m *MarmotEndpoint) GetNetworkLoadBalancerById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetNetworkLoadBalancers added in v0.20.0

func (m *MarmotEndpoint) GetNetworkLoadBalancers() ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetRoleByName added in v0.25.0

func (m *MarmotEndpoint) GetRoleByName(roleName string) (*api.Role, error)

func (*MarmotEndpoint) GetServerById added in v0.9.1

func (m *MarmotEndpoint) GetServerById(id string) ([]byte, *url.URL, error)

サーバーの詳細を取得

func (*MarmotEndpoint) GetServers added in v0.9.1

func (m *MarmotEndpoint) GetServers() ([]byte, *url.URL, error)

サーバーの一覧を取得、フィルターは、パラメータで指定するようにする

func (*MarmotEndpoint) GetUserById added in v0.25.0

func (m *MarmotEndpoint) GetUserById(userID string) (*api.User, error)

func (*MarmotEndpoint) GetVersion

func (m *MarmotEndpoint) GetVersion() (*api.Version, error)

func (*MarmotEndpoint) GetVirtualNetworkById added in v0.11.0

func (m *MarmotEndpoint) GetVirtualNetworkById(id string) ([]byte, *url.URL, error)

仮想プライベートネットワークの詳細を取得

func (*MarmotEndpoint) GetVirtualNetworks added in v0.11.0

func (m *MarmotEndpoint) GetVirtualNetworks() ([]byte, *url.URL, error)

仮想プライベートネットワークの一覧を取得、フィルターは、パラメータで指定するようにする

func (*MarmotEndpoint) GetVpnGatewayById added in v0.17.0

func (m *MarmotEndpoint) GetVpnGatewayById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetVpnGatewayCertById added in v0.17.0

func (m *MarmotEndpoint) GetVpnGatewayCertById(id string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) GetVpnGateways added in v0.17.0

func (m *MarmotEndpoint) GetVpnGateways() ([]byte, *url.URL, error)

func (*MarmotEndpoint) ImportImageArchive added in v0.20.0

func (m *MarmotEndpoint) ImportImageArchive(tgzPath string) ([]byte, *url.URL, error)

tgzファイルをアップロードしてイメージをインポートする

func (*MarmotEndpoint) ListIpNetworks added in v0.11.4

func (m *MarmotEndpoint) ListIpNetworks() ([]byte, *url.URL, error)

全ての仮想ネットワークに割り当てられたIPネットワークの一覧を取得

func (*MarmotEndpoint) ListRoles added in v0.25.0

func (m *MarmotEndpoint) ListRoles() (api.Roles, error)

func (*MarmotEndpoint) ListUserApiKeys added in v0.25.0

func (m *MarmotEndpoint) ListUserApiKeys(userID string) (api.ApiKeys, error)

func (*MarmotEndpoint) ListUserRoles added in v0.25.0

func (m *MarmotEndpoint) ListUserRoles(userID string) (api.RoleNames, error)

func (*MarmotEndpoint) ListUsers added in v0.25.0

func (m *MarmotEndpoint) ListUsers() (api.Users, error)

func (*MarmotEndpoint) ListVolumes added in v0.9.1

func (m *MarmotEndpoint) ListVolumes() ([]byte, *url.URL, error)

ボリュームの一覧取得

func (*MarmotEndpoint) LockUserById added in v0.25.0

func (m *MarmotEndpoint) LockUserById(userID string) error

func (*MarmotEndpoint) MakeImageEntryFromRunningVMById added in v0.11.0

func (m *MarmotEndpoint) MakeImageEntryFromRunningVMById(id, name string) ([]byte, *url.URL, error)

func (*MarmotEndpoint) Ping

func (m *MarmotEndpoint) Ping() (int, []byte, *url.URL, error)

func (*MarmotEndpoint) SetAccessToken added in v0.25.0

func (m *MarmotEndpoint) SetAccessToken(token string)

func (*MarmotEndpoint) ShowImageById added in v0.11.0

func (m *MarmotEndpoint) ShowImageById(key string) ([]byte, *url.URL, error)

イメージの詳細取得

func (*MarmotEndpoint) ShowVolumeById added in v0.9.1

func (m *MarmotEndpoint) ShowVolumeById(key string) ([]byte, *url.URL, error)

ボリュームの詳細取得

func (*MarmotEndpoint) StartServerById added in v0.11.6

func (m *MarmotEndpoint) StartServerById(id string) ([]byte, *url.URL, error)

サーバーの起動

func (*MarmotEndpoint) StopServerById added in v0.11.6

func (m *MarmotEndpoint) StopServerById(id string) ([]byte, *url.URL, error)

サーバーの停止

func (*MarmotEndpoint) UnlockUserById added in v0.25.0

func (m *MarmotEndpoint) UnlockUserById(userID string) error

func (*MarmotEndpoint) UpdateGatewayById added in v0.16.0

func (m *MarmotEndpoint) UpdateGatewayById(id string, spec api.Gateway) ([]byte, *url.URL, error)

UpdateGatewayById updates a gateway by ID.

func (*MarmotEndpoint) UpdateImageById added in v0.11.0

func (m *MarmotEndpoint) UpdateImageById(key string, spec api.Image) ([]byte, *url.URL, error)

イメージの更新

func (*MarmotEndpoint) UpdateLoadBalancerById added in v0.19.0

func (m *MarmotEndpoint) UpdateLoadBalancerById(id string, spec api.ApplicationLoadBalancer) ([]byte, *url.URL, error)

func (*MarmotEndpoint) UpdateNetworkLoadBalancerById added in v0.20.0

func (m *MarmotEndpoint) UpdateNetworkLoadBalancerById(id string, spec api.NetworkLoadBalancer) ([]byte, *url.URL, error)

func (*MarmotEndpoint) UpdateServerById added in v0.9.1

func (m *MarmotEndpoint) UpdateServerById(id string, spec api.Server) ([]byte, *url.URL, error)

サーバーの更新

func (*MarmotEndpoint) UpdateUserById added in v0.25.0

func (m *MarmotEndpoint) UpdateUserById(userID string, user api.User) (*api.User, error)

func (*MarmotEndpoint) UpdateVirtualNetworkById added in v0.11.0

func (m *MarmotEndpoint) UpdateVirtualNetworkById(id string, spec api.VirtualNetwork) ([]byte, *url.URL, error)

仮想プライベートネットワークの更新

func (*MarmotEndpoint) UpdateVolumeById added in v0.9.1

func (m *MarmotEndpoint) UpdateVolumeById(key string, spec api.Volume) ([]byte, *url.URL, error)

ボリュームの更新

func (*MarmotEndpoint) UpdateVpnGatewayById added in v0.17.0

func (m *MarmotEndpoint) UpdateVpnGatewayById(id string, spec api.VpnGateway) ([]byte, *url.URL, error)

Jump to

Keyboard shortcuts

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