package
1.2.4
Repository: https://github.com/ccheers/xpkg.git
Documentation: pkg.go.dev

# README

oss

import "github.com/ccheers/xpkg/oss"

Index

func IsErrNoMatchType

func IsErrNoMatchType(err error) bool

IsErrNoMatchType 错误断言 判断错误是否是: 未匹配 oss 错误

type Config

Config Oss 配置

type Config struct {
    AccessKey       string
    AccessKeySecret string
    EndPoint        string
}

type Oss

Oss 抽象接口

type Oss interface {
    Set(ctx context.Context, bucket string, key string, reader io.Reader) (err error)
    Get(ctx context.Context, bucket string, key string) (resp []byte, err error)
}

func Factory

func Factory(tp Type, config Config) (Oss, error)

Factory 工厂函数

type Type

Type Oss 类型

type Type string
const (
    // OssTypeHuaweiYun Oss 类型是华为云
    OssTypeHuaweiYun Type = "huaweiyun"
    // OssTypeAliYun Oss 类型是阿里云
    OssTypeAliYun Type = "aliyun"
)

Generated by gomarkdoc

# Packages

No description provided by the author
No description provided by the author

# Functions

Factory 工厂函数.
IsErrNoMatchType 错误断言 判断错误是否是: 未匹配 oss 错误.

# Constants

OssTypeAliYun Oss 类型是阿里云.
OssTypeHuaweiYun Oss 类型是华为云.

# Structs

Config Oss 配置.

# Interfaces

Oss 抽象接口.

# Type aliases

Type Oss 类型.