s3path

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseName

func BaseName(key string) string

BaseName 返回 key 末段(最后一个 / 之后的部分),用于从 S3 key 派生文件名。

func JoinKey

func JoinKey(base, name string) string

JoinKey 在已有 key 基础上追加子路径

Types

type S3Path

type S3Path struct {
	Bucket string
	Key    string
}

S3Path 表示一个 s3://bucket/key 路径

func Parse

func Parse(s string) (*S3Path, error)

Parse 解析 s3://bucket/key 形式的路径。 允许只有 s3://bucket (Key 为空,用于 ls 桶根)。

func (*S3Path) Format

func (p *S3Path) Format() string

Format 拼回 s3://bucket/key

Jump to

Keyboard shortcuts

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