Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageSignedURLService ¶
type StorageSignedURLService struct { ServiceAccountName string ServiceAccountID string IAMService *iam.Service IAMCredentialsClient *credentials.IamCredentialsClient }
StorageSignedURLService is Storage Signed URL Util Service
func NewStorageSignedURLService ¶
func NewStorageSignedURLService(ctx context.Context, serviceAccountName string, serviceAccountID string, iamService *iam.Service, iamCredentialsClient *credentials.IamCredentialsClient) (*StorageSignedURLService, error)
NewStorageSignedURLService is StorageServiceを生成する
利用するServiceAccountの roles/iam.serviceAccountTokenCreator https://cloud.google.com/iam/docs/service-accounts?hl=en#the_service_account_token_creator_role を持っている必要がある serviceAccountName is SignedURLを発行するServiceAccountの @ より前の値。ex. hoge@projectid.iam.gserviceaccount.com の場合は "hoge" serviceAccountID is serviceAccountNameに指定したものと同じServiceAccountのID。format "projects/%s/serviceAccounts/%s"。 iamService is iamService
func (*StorageSignedURLService) CreateDownloadURL ¶
Click to show internal directories.
Click to hide internal directories.