package arn

import "github.com/oslokommune/okctl/pkg/arn"

Package arn knows how to validate arns

Index

Constants

const (
	ServiceElasticLoadBalancing ServiceType = "elasticloadbalancing"

	ResourceLoadBalancer ResourceType = "loadbalancer/app/"
)

nolint: golint

Functions

func Is

func Is(service ServiceType, resource ResourceType, arn string) (bool, error)

Is returns true if the arn if of expected service and resource type nolint: interfacer

func IsLoadBalancer

func IsLoadBalancer(arn string) (bool, error)

IsLoadBalancer returns true if the provided ARN is an ARN and has correct service and resource type

func Parse

func Parse(arn string) (*arnpkg.ARN, error)

Parse and validate the provided ARN

Types

type ResourceType

type ResourceType string

ResourceType enumerates known AWS resources

func (ResourceType) String

func (t ResourceType) String() string

String returns the string

type ServiceType

type ServiceType string

ServiceType enumerates known AWS services

func (ServiceType) String

func (s ServiceType) String() string

String returns the string

Source Files

arn.go

Version
v0.0.106 (latest)
Published
Oct 21, 2022
Platform
linux/amd64
Imports
3 packages
Last checked
19 hours ago

Tools for package owners.