arn

package
v1.34.24 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsARN

func IsARN(s string) bool

IsARN returns whether the given string is an ARN

func SplitResource

func SplitResource(v string) []string

SplitResource splits the resource components by the ARN resource delimiters.

Types

type AccessPointARN

type AccessPointARN struct {
	arn.ARN
	AccessPointName string
}

AccessPointARN provides representation

func ParseAccessPointResource

func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error)

ParseAccessPointResource attempts to parse the ARN's resource as an AccessPoint resource.

func (AccessPointARN) GetARN

func (a AccessPointARN) GetARN() arn.ARN

GetARN returns the base ARN for the Access Point resource

type InvalidARNError

type InvalidARNError struct {
	ARN    arn.ARN
	Reason string
}

InvalidARNError provides the error for an invalid ARN error.

func (InvalidARNError) Error

func (e InvalidARNError) Error() string

type Resource

type Resource interface {
	GetARN() arn.ARN
	String() string
}

Resource provides the interfaces abstracting ARNs of specific resource types.

func ParseResource

func ParseResource(s string, resParser ResourceParser) (resARN Resource, err error)

ParseResource parses an AWS ARN into a typed resource for the S3 API.

type ResourceParser

type ResourceParser func(arn.ARN) (Resource, error)

ResourceParser provides the function for parsing an ARN's resource component into a typed resource.

Jump to

Keyboard shortcuts

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