ec2metadata

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AWSRSAIdentityCert is the RSA public certificate
	AWSRSAIdentityCert = `` /* 1146-byte string literal not displayed */

)

Variables

View Source
var (
	// RSACert AWS Public Certificate
	RSACert *x509.Certificate
)

Functions

func GetSignedDocument

func GetSignedDocument() ([]byte, error)

func Verify

func Verify(doc []byte, signature string) error

Types

type Document

type Document struct {
	AvailabilityZone string `json:"availabilityZone"`
	Architecture     string `json:"architecture"`
	PrivateIp        string `json:"privateIp"`
	Region           string `json:"region"`
	InstanceId       string `json:"instanceId"`
	AccountId        string `json:"accountId"`
	InstanceType     string `json:"instanceType"`
	ImageId          string `json:"imageId"`
}

A Document provides a struct for EC2 instance identity documents to be unmarshaled.

func (*Document) Hash

func (d *Document) Hash() string

func (*Document) Name

func (d *Document) Name() string

Name returns the logical name for the instance described in the identity document and is the value used when deriving the unique identifier hash.

type SignedDocument

type SignedDocument struct {
	Document  []byte `json:"document"`
	Signature string `json:"signature"`
}

Jump to

Keyboard shortcuts

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