Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sacloud/api-client-goの導入 #30

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

yamamoto-febc
Copy link
Member

sacloud/api-client-goを導入する。

これにより各種環境変数(SAKURACLOUD_xxx)やUsacloud互換のプロファイル機能が利用可能になる。
オプションでこれらを無効にすることも可能。

// 特にオプションを指定しなかった場合は環境変数+プロファイルが利用される
apiClient := &objectstorage.Client{}
// 環境変数+プロファイルからの読み込みを無効にする場合(別途APIキーの指定が必要)
apiClient := &objectstorage.Client{
	DisableProfile: true,
	DisableEnv:     true,

	Token:       "xxx",
	Secret: "xxx",
}

@yamamoto-febc yamamoto-febc merged commit 93991a2 into sacloud:main Mar 22, 2022
@yamamoto-febc yamamoto-febc deleted the sacloud/api-client-go branch March 22, 2022 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant