Documentation ¶
Index ¶
- Variables
- func ErrorNotAllowExt(format string, args ...interface{}) *errors.Error
- func IsNotAllowExt(err error) bool
- type Client
- type Conf
- func (*Conf) Descriptor() ([]byte, []int)deprecated
- func (x *Conf) GetBucket() string
- func (x *Conf) GetCloudFront() string
- func (x *Conf) GetDir() string
- func (x *Conf) GetKey() string
- func (x *Conf) GetRegion() string
- func (x *Conf) GetSecret() string
- func (*Conf) ProtoMessage()
- func (x *Conf) ProtoReflect() protoreflect.Message
- func (x *Conf) Reset()
- func (x *Conf) String() string
- func (m *Conf) Validate() error
- func (m *Conf) ValidateAll() error
- type ConfMultiError
- type ConfValidationError
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "NOT_ALLOW_EXT", } ErrorReason_value = map[string]int32{ "NOT_ALLOW_EXT": 0, } )
Enum value maps for ErrorReason.
var File_fs_google_conf_proto protoreflect.FileDescriptor
Functions ¶
func ErrorNotAllowExt ¶
为某个枚举单独设置错误码
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SaveWebSiteImage ¶
SaveWebSiteImage 转存网络上的视频或图片
type Conf ¶
type Conf struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"` Region string `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"` Bucket string `protobuf:"bytes,4,opt,name=bucket,proto3" json:"bucket,omitempty"` Dir string `protobuf:"bytes,5,opt,name=dir,proto3" json:"dir,omitempty"` CloudFront string `protobuf:"bytes,6,opt,name=cloud_front,json=cloudFront,proto3" json:"cloud_front,omitempty"` // contains filtered or unexported fields }
func (*Conf) Descriptor
deprecated
func (*Conf) GetCloudFront ¶
func (*Conf) ProtoMessage ¶
func (*Conf) ProtoMessage()
func (*Conf) ProtoReflect ¶
func (x *Conf) ProtoReflect() protoreflect.Message
func (*Conf) Validate ¶
Validate checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Conf) ValidateAll ¶
ValidateAll checks the field values on Conf with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ConfMultiError, or nil if none found.
type ConfMultiError ¶
type ConfMultiError []error
ConfMultiError is an error wrapping multiple validation errors returned by Conf.ValidateAll() if the designated constraints aren't met.
func (ConfMultiError) AllErrors ¶
func (m ConfMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ConfMultiError) Error ¶
func (m ConfMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ConfValidationError ¶
type ConfValidationError struct {
// contains filtered or unexported fields
}
ConfValidationError is the validation error returned by Conf.Validate if the designated constraints aren't met.
func (ConfValidationError) Cause ¶
func (e ConfValidationError) Cause() error
Cause function returns cause value.
func (ConfValidationError) Error ¶
func (e ConfValidationError) Error() string
Error satisfies the builtin error interface
func (ConfValidationError) ErrorName ¶
func (e ConfValidationError) ErrorName() string
ErrorName returns error name.
func (ConfValidationError) Field ¶
func (e ConfValidationError) Field() string
Field function returns field value.
func (ConfValidationError) Key ¶
func (e ConfValidationError) Key() bool
Key function returns key value.
func (ConfValidationError) Reason ¶
func (e ConfValidationError) Reason() string
Reason function returns reason value.
type ErrorReason ¶
type ErrorReason int32
const ( // 为某个枚举单独设置错误码 ErrorReason_NOT_ALLOW_EXT ErrorReason = 0 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType