errs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrEntityTypeBucket      = "bucket"
	ErrEntityTypeObject      = "object"
	ErrEntityTypeUser        = "user"
	ErrEntityTypeAccessKey   = "access_key"
	ErrEntityTypeGroup       = "group"
	ErrEntityTypeUserGroup   = "user_group"
	ErrEntityTypePolicy      = "policy"
	ErrEntityTypeUserPolicy  = "user_policy"
	ErrEntityTypeGroupPolicy = "group_policy"
)

Variables

This section is empty.

Functions

func HTTPMissingQueryParam

func HTTPMissingQueryParam(param string) error

func Handle

func Handle(w http.ResponseWriter, err error)

Types

type ErrEntityType

type ErrEntityType string

type ErrExists

type ErrExists struct {
	Type     ErrEntityType
	Resource string
}

func (*ErrExists) Error

func (e *ErrExists) Error() string

type ErrForbidden

type ErrForbidden struct {
	Type     ErrEntityType
	Resource string
}

func (*ErrForbidden) Error

func (e *ErrForbidden) Error() string

type ErrGroupPolicyNotAttached

type ErrGroupPolicyNotAttached struct {
	GroupID  string
	PolicyID string
}

func (*ErrGroupPolicyNotAttached) Description

func (e *ErrGroupPolicyNotAttached) Description() string

func (*ErrGroupPolicyNotAttached) Error

func (e *ErrGroupPolicyNotAttached) Error() string

type ErrNotDirectory

type ErrNotDirectory struct {
	Path string
}

func (*ErrNotDirectory) Error

func (e *ErrNotDirectory) Error() string

type ErrNotFound

type ErrNotFound struct {
	Type     ErrEntityType
	Resource string
}

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

type ErrPathTraversal

type ErrPathTraversal struct {
	BaseDir string
	Path    string
}

func (*ErrPathTraversal) Error

func (e *ErrPathTraversal) Error() string

type ErrUserNotInGroup

type ErrUserNotInGroup struct {
	UserID  string
	GroupID string
}

func (*ErrUserNotInGroup) Description

func (e *ErrUserNotInGroup) Description() string

func (*ErrUserNotInGroup) Error

func (e *ErrUserNotInGroup) Error() string

type ErrUserPolicyNotAttached

type ErrUserPolicyNotAttached struct {
	UserID   string
	PolicyID string
}

func (*ErrUserPolicyNotAttached) Description

func (e *ErrUserPolicyNotAttached) Description() string

func (*ErrUserPolicyNotAttached) Error

func (e *ErrUserPolicyNotAttached) Error() string

type IAMError

type IAMError struct {
	Type       IAMErrorType
	Code       string
	Message    string
	RequestId  string `xml:"-"`
	StatusCode int    `xml:"-"`
}

func IAMDeleteConflict

func IAMDeleteConflict(entityName string) *IAMError

func IAMEntityAlreadyExists

func IAMEntityAlreadyExists(entityName string) *IAMError

func IAMNoSuchEntity

func IAMNoSuchEntity(entityType, entityName string) *IAMError

func IAMNotImplemented

func IAMNotImplemented(action string) *IAMError

func IAMServiceFailure

func IAMServiceFailure() *IAMError

func (*IAMError) Error

func (e *IAMError) Error() string

type IAMErrorResponse

type IAMErrorResponse struct {
	XMLName   xml.Name `xml:"ErrorResponse"`
	Error     *IAMError
	RequestId string
}

type IAMErrorType

type IAMErrorType string
const (
	IAMSenderType   IAMErrorType = "Sender"
	IAMReceiverType IAMErrorType = "Receiver"
)

type S3Error

type S3Error struct {
	XMLName    xml.Name `xml:"Error"`
	Code       string
	Message    string
	Resource   string
	BucketName string
	Key        string
	VersionId  string
	RequestId  string
	HostId     string
	StatusCode int `xml:"-"`
}

func S3AccessDenied

func S3AccessDenied() *S3Error

func S3BucketAlreadyExists

func S3BucketAlreadyExists() *S3Error

func S3InternalError

func S3InternalError() *S3Error

func S3NoSuchBucket

func S3NoSuchBucket(bucket string) *S3Error

func S3NoSuchKey

func S3NoSuchKey(key string) *S3Error

func S3OperationAborted

func S3OperationAborted(bucket, key string) *S3Error

func S3SignatureDoesNotMatch

func S3SignatureDoesNotMatch() *S3Error

func (*S3Error) Error

func (e *S3Error) Error() string

func (*S3Error) WithHostID

func (e *S3Error) WithHostID(hostID string) *S3Error

func (*S3Error) WithRequestID

func (e *S3Error) WithRequestID(requestID string) *S3Error

func (*S3Error) WithResource

func (e *S3Error) WithResource(resource string) *S3Error

Jump to

Keyboard shortcuts

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