aws

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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