aws

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AWSCredentials

func AWSCredentials(id, secret string) *credentials.Credentials

func NewAWSClient

func NewAWSClient() (*ecs.Client, error)

NewAWSClient creates an AWS client from: 1) Environment Variables 2) Shared Configuration 3) Shared Credentials files.

Types

type EcsEnvRequest

type EcsEnvRequest struct {
	Artifacts []*EcsTaskData `json:"artifacts"`
	Type      string         `json:"type"`
	Id        string         `json:"id"`
}

EcsEnvRequest represents the PUT request body to be sent to kosli from ECS

type EcsTaskData

type EcsTaskData struct {
	TaskArn   string            `json:"taskArn"`
	Digests   map[string]string `json:"digests"`
	StartedAt int64             `json:"creationTimestamp"`
}

EcsTaskData represents the harvested ECS task data

func GetEcsTasksData

func GetEcsTasksData(client *ecs.Client, cluster string, serviceName string) ([]*EcsTaskData, error)

GetEcsTasksData returns a list of tasks data for an ECS cluster or service

func NewEcsTaskData

func NewEcsTaskData(taskArn string, digests map[string]string, startedAt time.Time) *EcsTaskData

NewEcsTaskData creates a NewEcsTaskData object from an ECS task

type LambdaData

type LambdaData struct {
	Digests               map[string]string `json:"digests"`
	LastModifiedTimestamp int64             `json:"creationTimestamp"`
}

LambdaData represents the harvested Lambda artifacts data

func GetLambdaPackageData

func GetLambdaPackageData(functionName, functionVersion string, creds *credentials.Credentials, region string) ([]*LambdaData, error)

GetLambdaPackageData returns a digest and metadata of a Lambda function package

type LambdaEnvRequest

type LambdaEnvRequest struct {
	Artifacts []*LambdaData `json:"artifacts"`
	Type      string        `json:"type"`
	Id        string        `json:"id"`
}

LambdaEnvRequest represents the PUT request body to be sent to kosli from a server

type S3Data

type S3Data struct {
	Digests               map[string]string `json:"digests"`
	LastModifiedTimestamp int64             `json:"creationTimestamp"`
}

S3Data represents the harvested S3 artifacts data

func GetS3Data

func GetS3Data(bucket string, creds *credentials.Credentials, region string) ([]*S3Data, error)

GetS3Data returns a digest and metadata of the S3 bucket content

type S3EnvRequest

type S3EnvRequest struct {
	Artifacts []*S3Data `json:"artifacts"`
	Type      string    `json:"type"`
	Id        string    `json:"id"`
}

S3EnvRequest represents the PUT request body to be sent to kosli from a server

Jump to

Keyboard shortcuts

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