package arn

import "github.com/aws/aws-sdk-go-v2/service/s3/internal/arn"

Index

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.

Source Files

accesspoint_arn.go arn.go

Version
v0.23.0
Published
May 28, 2020
Platform
darwin/amd64
Imports
2 packages
Last checked
5 minutes ago

Tools for package owners.