Versions in this module Expand all Collapse all v0 v0.5.1 Nov 28, 2025 v0.5.0 Nov 11, 2025 v0.4.2 Oct 29, 2025 v0.4.1 Oct 28, 2025 v0.4.0 Sep 30, 2025 v0.3.4 Jul 17, 2025 v0.3.3 Apr 13, 2025 v0.3.2 Mar 25, 2025 v0.3.1 Mar 22, 2025 v0.3.0 Mar 13, 2025 v0.2.0 Mar 10, 2025 v0.1.0 Feb 28, 2025 v0.0.2 Feb 19, 2025 v0.0.1 Dec 30, 2024 Changes in this version + var S3Builders = map[Kind]S3ProviderBuilder + func GetProviderKey(fs *ProviderConfig) string + func InitAwsClient(ctx context.Context, fs *ProviderConfig) (*s3.Client, error) + func RegisterS3Provider(kind Kind, builder S3ProviderBuilder) + type AwsS3 struct + func (p *AwsS3) GetPreSignedURL(ctx context.Context, bucket, path string, expires time.Duration) (string, error) + func (p *AwsS3) GetSTS(ctx context.Context, roleSessionName string) (*STSResponse, error) + func (p *AwsS3) ParseUrlKey(urlStr string) (key string, err error) + func (p *AwsS3) ProviderConfig() *ProviderConfig + func (p *AwsS3) S3Client() *s3.Client + type BizKey interface + type Client struct + FileIdentityAPI *FileIdentityAPI + func NewClient(cfg *Config) (*Client, error) + func (c *Client) AddInterceptor(interceptor InterceptFunc) + func (c *Client) Do(ctx context.Context, req *http.Request) (res *http.Response, err error) + func (c *Client) DownloadObjectByKey(bizKey string, url string, localFile string, optFns ...DownloadOptionFn) error + func (c *Client) GetProviderByBizKey(bizKey string) (S3Provider, error) + func (c *Client) RegistryProvider(cfg *ProviderConfig, bizKey string) error + type Config struct + BasePath string + HTTPClient *http.Client + Headers map[string]string + Host string + Providers []ProviderConfig + UserAgent string + func NewConfig() *Config + type Data struct + FileIdentitiesForApp []*FileIdentity + type DownloadOption struct + OverwrittenFile bool + type DownloadOptionFn func(options *DownloadOption) + func WithOverwrittenFile(overwrittenFile bool) DownloadOptionFn + type EndpointResolverV2 struct + EndpointImmutable bool + func (r *EndpointResolverV2) ResolveEndpoint(ctx context.Context, params s3.EndpointParameters) (smithyendpoints.Endpoint, error) + type FileIdentity struct + AccessKeyID string + AccessKeySecret string + DurationSeconds int + ID ID + IsDefault bool + Policy string + RoleArn string + Source *FileSource + TenantID ID + type FileIdentityAPI api + func (a *FileIdentityAPI) GetFileIdentities(ctx context.Context, req *GetFileIdentitiesRequest) (ret []*FileIdentity, resp *http.Response, err error) + type FileSource struct + Bucket string + BucketURL string + Endpoint string + EndpointImmutable bool + ID ID + Kind Kind + Region string + StsEndpoint string + type GetFileIdentitiesRequest struct + IsDefault bool + TenantIDs []int + type GraphqlRequest struct + Query string + Variables interface{} + type ID int + func (i *ID) String() string + func (i *ID) UnmarshalJSON(data []byte) error + type InterceptFunc func(context.Context, *http.Request) error + type Kind string + const KindAliOSS + const KindAwsS3 + const KindMinio + type ProviderConfig struct + AccessKeyID string + AccessKeySecret string + Bucket string + BucketUrl string + DurationSeconds int + Endpoint string + EndpointImmutable bool + Kind Kind + Policy string + Region string + RoleArn string + StsEndpoint string + func ToProviderConfig(fi *FileIdentity) *ProviderConfig + type Result struct + Data Data + type S3Provider interface + GetPreSignedURL func(ctx context.Context, bucket, path string, expires time.Duration) (string, error) + GetSTS func(ctx context.Context, roleSessionName string) (*STSResponse, error) + ParseUrlKey func(urlStr string) (key string, err error) + ProviderConfig func() *ProviderConfig + S3Client func() *s3.Client + func BuildAwsS3(ctx context.Context, fileSource *ProviderConfig) (S3Provider, error) + type S3ProviderBuilder func(context.Context, *ProviderConfig) (S3Provider, error) + type STSResponse struct + AccessKeyID string + Expiration time.Time + SecretAccessKey string + SessionToken string