sts

package
v0.0.0-...-3d72318 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2014 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STS_API_VERSION = "2011-06-15"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	SessionToken    string
	SecretAccessKey string
	Expiration      string
	AccessKeyId     string
}

type Error

type Error struct {
	Type    string
	Code    string
	Message string
}

type ErrorResponse

type ErrorResponse struct {
	Err       Error `xml:"Error"`
	RequestId string
}

func (*ErrorResponse) Error

func (this *ErrorResponse) Error() string

type FederatedUser

type FederatedUser struct {
	Arn             string
	FederatedUserId string
}

type GetFederationTokenReq

type GetFederationTokenReq struct {
	STSReq

	DurationSeconds int    // 900 seconds(15 minutes) ~ 129600 seconds(36 hours)
	Name            string // 2 <= Length(Name) <= 12
	Policy          string // json format, 0, 1 <= Length(Policy) <= 2048
}

func (*GetFederationTokenReq) Init

type GetFederationTokenResp

type GetFederationTokenResp struct {
	STSResp `xml:"-"`

	GetFederationTokenResult GetFederationTokenResult
	ResponseMetadata         ResponseMetadata
}

func (*GetFederationTokenResp) Init

type GetFederationTokenResult

type GetFederationTokenResult struct {
	Credentials      Credentials
	FederatedUser    FederatedUser
	PackedPolicySize int
}

type ResponseMetadata

type ResponseMetadata struct {
	RequestId string
}

type STS

type STS struct {
	common.AWSService
}

*

ref: http://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html

func NewSTS

func NewSTS(cred *common.Credentials) (*STS, error)

func (*STS) GetFederationToken

func (this *STS) GetFederationToken(req *GetFederationTokenReq) (resp *GetFederationTokenResp, err error)

func (*STS) Init

func (this *STS) Init(cred *common.Credentials) (*STS, error)

type STSReq

type STSReq struct {
	common.AWSRequest
}

type STSResp

type STSResp struct {
	common.AWSResponse

	ErrorResponse *ErrorResponse
}

func (*STSResp) Init

func (this *STSResp) Init(req *STSReq, resp *http.Response) (*STSResp, error)

Jump to

Keyboard shortcuts

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