api

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package api defines all APIs supported by the STS service of BCE.

Index

Constants

View Source
const (
	DEFAULT_DURATION_SECONDS = 43200                 // default duration is 12 hours
	URI_PREFIX               = bce.URI_PREFIX + "v1" // sts service not support uri without prefix "v1"
	REQUEST_URI              = "/sessionToken"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetSessionTokenResult

type GetSessionTokenResult struct {
	AccessKeyId     string
	SecretAccessKey string
	SessionToken    string
	CreateTime      string
	Expiration      string
	UserId          string
}

func GetSessionToken

func GetSessionToken(cli bce.Client, durationSec int, acl string) (*GetSessionTokenResult, error)

GetSessionToken - get the session token from the STS service

PARAMS:

  • cli: the client object which can perform sending request
  • durationSec: the duration seconds of the token
  • acl: the acl string

RETURNS:

  • *GetSessionTokenResult: result of this api
  • error: nil if ok otherwise the specific error

Jump to

Keyboard shortcuts

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