parser

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParseHCL           = errors.New("ParseHCL return a nil")
	ErrSchemaConfig       = errors.New("unable to configure schema for config file")
	ErrProfileNotSelected = errors.New("select_profile is required")
)

Functions

This section is empty.

Types

type Chain

type Chain struct {
	TTL      int64       `hcl:"ttl,optional"`
	UseRoles []*UseRoles `hcl:"use,block"`
}

type Config

type Config struct {
	SelectProfile string     `hcl:"select_profile"`
	Profiles      []*Profile `hcl:"profile,block"`
}

func ParseFile

func ParseFile(path string) (*Config, error)

func (*Config) ToFlags

func (c *Config) ToFlags() (int64, []string, []string, error)

type Profile

type Profile struct {
	Name   string `hcl:"name,label"`
	Region string `hcl:"region,optional"`
	Chain  *Chain `hcl:"chain,block"`
}

type UseRoles

type UseRoles struct {
	ARN  string `hcl:"arn"`
	Skip bool   `hcl:"skip,optional"`
}

Jump to

Keyboard shortcuts

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