test-errcode
withchao 2 years ago
parent 316fa10257
commit e9865539de

@ -1,6 +1,7 @@
package third
import (
"OpenIM/pkg/common/tokenverify"
"OpenIM/pkg/proto/third"
"context"
"time"
@ -19,6 +20,11 @@ func (t *thirdServer) ConfirmPut(ctx context.Context, req *third.ConfirmPutReq)
}
func (t *thirdServer) GetUrl(ctx context.Context, req *third.GetUrlReq) (*third.GetUrlResp, error) {
if req.Expires <= 0 {
if err := tokenverify.CheckAdmin(ctx); err != nil {
return nil, err
}
}
return t.s3dataBase.GetUrl(ctx, req)
}

@ -92,15 +92,12 @@ type config struct {
OssRoleArn string `yaml:"OssRoleArn"`
}
Minio struct {
Bucket string `yaml:"bucket"`
AppBucket string `yaml:"appBucket"`
TempBucket string `yaml:"tempBucket"`
DataBucket string `yaml:"dataBucket"`
Location string `yaml:"location"`
Endpoint string `yaml:"endpoint"`
AccessKeyID string `yaml:"accessKeyID"`
SecretAccessKey string `yaml:"secretAccessKey"`
EndpointInner string `yaml:"endpointInner"`
EndpointInnerEnable bool `yaml:"endpointInnerEnable"`
StorageTime int `yaml:"storageTime"`
IsDistributedMod bool `yaml:"isDistributedMod"`
} `yaml:"minio"`
Aws struct {

@ -20,6 +20,12 @@ import (
"time"
)
const (
hashPrefix = "hash"
tempPrefix = "temp"
fragmentPrefix = "fragment_"
)
type S3Database interface {
ApplyPut(ctx context.Context, req *third.ApplyPutReq) (*third.ApplyPutResp, error)
GetPut(ctx context.Context, req *third.GetPutReq) (*third.GetPutResp, error)
@ -51,7 +57,7 @@ func (c *s3Database) today() string {
// fragmentName 根据序号生成文件名
func (c *s3Database) fragmentName(index int) string {
return "fragment_" + strconv.Itoa(index+1)
return fragmentPrefix + strconv.Itoa(index+1)
}
// getFragmentNum 获取分片大小和分片数量
@ -79,17 +85,12 @@ func (c *s3Database) CheckHash(hash string) error {
return err
}
if len(val) != md5.Size {
return errors.New("hash value error")
return errs.ErrArgs.Wrap("invalid hash")
}
return nil
}
func (c *s3Database) urlName(name string) string {
//if name[0] != '/' {
// name = "/" + name
//}
//config.Config.Credential.ObjectURL + name
//return "http://127.0.0.1:8080" + name
return config.Config.Object.ApiURL + name
}
@ -98,7 +99,7 @@ func (c *s3Database) UUID() string {
}
func (c *s3Database) HashName(hash string) string {
return path.Join("hash", c.today(), c.UUID())
return path.Join(hashPrefix, hash+"_"+c.today()+"_"+c.UUID())
}
func (c *s3Database) isNotFound(err error) bool {
@ -146,7 +147,7 @@ func (c *s3Database) ApplyPut(ctx context.Context, req *third.ApplyPutReq) (*thi
ExpirationTime: expirationTime,
EffectiveTime: time.Now().Add(effective),
}
put.Path = path.Join("upload", c.today(), req.Hash, put.PutID)
put.Path = path.Join(tempPrefix, c.today(), req.Hash, put.PutID)
putURLs := make([]string, 0, pack)
for i := 0; i < pack; i++ {
url, err := c.obj.PresignedPutURL(ctx, &obj.ApplyPutArgs{
@ -373,8 +374,12 @@ func (c *s3Database) GetUrl(ctx context.Context, req *third.GetUrlReq) (*third.G
if err != nil {
return nil, err
}
u, err := c.obj.GetURL(ctx, hash.Bucket, hash.Name, time.Duration(req.Expires)*time.Millisecond)
if err != nil {
return nil, err
}
return &third.GetUrlResp{
Url: c.obj.GetURL(hash.Bucket, hash.Name),
Url: u,
Size: hash.Size,
Hash: hash.Hash,
}, nil

@ -2,25 +2,18 @@ package obj
import (
"OpenIM/pkg/common/config"
"OpenIM/pkg/utils"
"context"
"errors"
"fmt"
"github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials"
"github.com/minio/minio-go/v7/pkg/s3utils"
"net/http"
"net/url"
"time"
)
func NewMinioClient() {
}
func NewMinioInterface() (Interface, error) {
if true {
return &minioImpl{}, nil // todo
}
conf := config.Config.Object.Minio
u, err := url.Parse(conf.Endpoint)
if err != nil {
@ -31,42 +24,43 @@ func NewMinioInterface() (Interface, error) {
}
client, err := minio.New(u.Host, &minio.Options{
Creds: credentials.NewStaticV4(conf.AccessKeyID, conf.SecretAccessKey, ""),
Secure: false,
Secure: u.Scheme == "https",
})
if err != nil {
return nil, fmt.Errorf("minio new client %w", err)
}
// todo 初始化连接和桶
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
defer cancel()
for _, bucket := range utils.Distinct([]string{conf.TempBucket, conf.DataBucket}) {
exists, err := client.BucketExists(ctx, bucket)
if err != nil {
return nil, fmt.Errorf("minio bucket %s exists %w", bucket, err)
}
if exists {
continue
}
opt := minio.MakeBucketOptions{
Region: conf.Location,
ObjectLocking: conf.IsDistributedMod,
}
if err := client.MakeBucket(ctx, conf.TempBucket, opt); err != nil {
return nil, fmt.Errorf("minio make bucket %s %w", bucket, err)
}
}
return &minioImpl{
client: client,
//tempBucket: conf.Bucket,
tempBucket: conf.TempBucket,
dataBucket: conf.DataBucket,
}, nil
}
type minioImpl struct {
tempBucket string // 上传桶
permanentBucket string // 永久桶
clearBucket string // 自动清理桶
dataBucket string // 永久桶
urlstr string // 访问地址
client *minio.Client
}
//func (m *minioImpl) Init() error {
// client, err := minio.New("127.0.0.1:9000", &minio.Options{
// Creds: credentials.NewStaticV4("minioadmin", "minioadmin", ""),
// Secure: false,
// })
// if err != nil {
// return fmt.Errorf("minio client error: %w", err)
// }
// m.urlstr = "http://127.0.0.1:9000"
// m.client = client
// m.tempBucket = "temp"
// m.permanentBucket = "permanent"
// m.clearBucket = "clear"
// return nil
//}
func (m *minioImpl) Name() string {
return "minio"
}
@ -83,26 +77,20 @@ func (m *minioImpl) MinExpirationTime() time.Duration {
return time.Hour * 24
}
func (m *minioImpl) AppendHeader() http.Header {
return map[string][]string{
"x-amz-object-append": {"true"},
}
}
func (m *minioImpl) TempBucket() string {
return m.tempBucket
}
func (m *minioImpl) DataBucket() string {
return m.permanentBucket
}
func (m *minioImpl) ClearBucket() string {
return m.clearBucket
return m.dataBucket
}
func (m *minioImpl) GetURL(bucket string, name string) string {
return fmt.Sprintf("%s/%s/%s", m.urlstr, bucket, name)
func (m *minioImpl) GetURL(ctx context.Context, bucket string, name string, expires time.Duration) (string, error) {
u, err := m.client.PresignedGetObject(ctx, bucket, name, expires, nil)
if err != nil {
return "", err
}
return u.String(), nil
}
func (m *minioImpl) PresignedPutURL(ctx context.Context, args *ApplyPutArgs) (string, error) {
@ -131,7 +119,6 @@ func (m *minioImpl) GetObjectInfo(ctx context.Context, args *BucketObject) (*Obj
return nil, err
}
return &ObjectInfo{
URL: m.GetURL(args.Bucket, args.Name),
Size: info.Size,
Hash: info.ETag,
}, nil

@ -20,10 +20,8 @@ type ApplyPutArgs struct {
}
type ObjectInfo struct {
URL string
Size int64
Hash string
Expiration time.Time
}
type Interface interface {
@ -40,7 +38,8 @@ type Interface interface {
// DataBucket 永久存储的桶名
DataBucket() string
// GetURL 通过桶名和对象名返回URL
GetURL(bucket string, name string) string
//GetURL(bucket string, name string) string
GetURL(ctx context.Context, bucket string, name string, expires time.Duration) (string, error)
// PresignedPutURL 申请上传,返回PUT的上传地址
PresignedPutURL(ctx context.Context, args *ApplyPutArgs) (string, error)
// GetObjectInfo 获取对象信息

@ -39,7 +39,7 @@ func (m *ApplyPutReq) Reset() { *m = ApplyPutReq{} }
func (m *ApplyPutReq) String() string { return proto.CompactTextString(m) }
func (*ApplyPutReq) ProtoMessage() {}
func (*ApplyPutReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{0}
return fileDescriptor_third_aac767b0c26bb83e, []int{0}
}
func (m *ApplyPutReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyPutReq.Unmarshal(m, b)
@ -109,7 +109,7 @@ func (m *ApplyPutResp) Reset() { *m = ApplyPutResp{} }
func (m *ApplyPutResp) String() string { return proto.CompactTextString(m) }
func (*ApplyPutResp) ProtoMessage() {}
func (*ApplyPutResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{1}
return fileDescriptor_third_aac767b0c26bb83e, []int{1}
}
func (m *ApplyPutResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplyPutResp.Unmarshal(m, b)
@ -168,7 +168,7 @@ func (m *ConfirmPutReq) Reset() { *m = ConfirmPutReq{} }
func (m *ConfirmPutReq) String() string { return proto.CompactTextString(m) }
func (*ConfirmPutReq) ProtoMessage() {}
func (*ConfirmPutReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{2}
return fileDescriptor_third_aac767b0c26bb83e, []int{2}
}
func (m *ConfirmPutReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfirmPutReq.Unmarshal(m, b)
@ -206,7 +206,7 @@ func (m *ConfirmPutResp) Reset() { *m = ConfirmPutResp{} }
func (m *ConfirmPutResp) String() string { return proto.CompactTextString(m) }
func (*ConfirmPutResp) ProtoMessage() {}
func (*ConfirmPutResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{3}
return fileDescriptor_third_aac767b0c26bb83e, []int{3}
}
func (m *ConfirmPutResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfirmPutResp.Unmarshal(m, b)
@ -235,6 +235,7 @@ func (m *ConfirmPutResp) GetUrl() string {
type GetUrlReq struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Expires int64 `protobuf:"varint,2,opt,name=expires" json:"expires,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -244,7 +245,7 @@ func (m *GetUrlReq) Reset() { *m = GetUrlReq{} }
func (m *GetUrlReq) String() string { return proto.CompactTextString(m) }
func (*GetUrlReq) ProtoMessage() {}
func (*GetUrlReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{4}
return fileDescriptor_third_aac767b0c26bb83e, []int{4}
}
func (m *GetUrlReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUrlReq.Unmarshal(m, b)
@ -271,6 +272,13 @@ func (m *GetUrlReq) GetName() string {
return ""
}
func (m *GetUrlReq) GetExpires() int64 {
if m != nil {
return m.Expires
}
return 0
}
type GetUrlResp struct {
Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
@ -284,7 +292,7 @@ func (m *GetUrlResp) Reset() { *m = GetUrlResp{} }
func (m *GetUrlResp) String() string { return proto.CompactTextString(m) }
func (*GetUrlResp) ProtoMessage() {}
func (*GetUrlResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{5}
return fileDescriptor_third_aac767b0c26bb83e, []int{5}
}
func (m *GetUrlResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUrlResp.Unmarshal(m, b)
@ -336,7 +344,7 @@ func (m *GetPutReq) Reset() { *m = GetPutReq{} }
func (m *GetPutReq) String() string { return proto.CompactTextString(m) }
func (*GetPutReq) ProtoMessage() {}
func (*GetPutReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{6}
return fileDescriptor_third_aac767b0c26bb83e, []int{6}
}
func (m *GetPutReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPutReq.Unmarshal(m, b)
@ -375,7 +383,7 @@ func (m *GetPutFragment) Reset() { *m = GetPutFragment{} }
func (m *GetPutFragment) String() string { return proto.CompactTextString(m) }
func (*GetPutFragment) ProtoMessage() {}
func (*GetPutFragment) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{7}
return fileDescriptor_third_aac767b0c26bb83e, []int{7}
}
func (m *GetPutFragment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPutFragment.Unmarshal(m, b)
@ -425,7 +433,7 @@ func (m *GetPutResp) Reset() { *m = GetPutResp{} }
func (m *GetPutResp) String() string { return proto.CompactTextString(m) }
func (*GetPutResp) ProtoMessage() {}
func (*GetPutResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{8}
return fileDescriptor_third_aac767b0c26bb83e, []int{8}
}
func (m *GetPutResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetPutResp.Unmarshal(m, b)
@ -498,7 +506,7 @@ func (m *GetSignalInvitationInfoReq) Reset() { *m = GetSignalInvitationI
func (m *GetSignalInvitationInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetSignalInvitationInfoReq) ProtoMessage() {}
func (*GetSignalInvitationInfoReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{9}
return fileDescriptor_third_aac767b0c26bb83e, []int{9}
}
func (m *GetSignalInvitationInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSignalInvitationInfoReq.Unmarshal(m, b)
@ -537,7 +545,7 @@ func (m *GetSignalInvitationInfoResp) Reset() { *m = GetSignalInvitation
func (m *GetSignalInvitationInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetSignalInvitationInfoResp) ProtoMessage() {}
func (*GetSignalInvitationInfoResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{10}
return fileDescriptor_third_aac767b0c26bb83e, []int{10}
}
func (m *GetSignalInvitationInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSignalInvitationInfoResp.Unmarshal(m, b)
@ -582,7 +590,7 @@ func (m *GetSignalInvitationInfoStartAppReq) Reset() { *m = GetSignalInv
func (m *GetSignalInvitationInfoStartAppReq) String() string { return proto.CompactTextString(m) }
func (*GetSignalInvitationInfoStartAppReq) ProtoMessage() {}
func (*GetSignalInvitationInfoStartAppReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{11}
return fileDescriptor_third_aac767b0c26bb83e, []int{11}
}
func (m *GetSignalInvitationInfoStartAppReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSignalInvitationInfoStartAppReq.Unmarshal(m, b)
@ -621,7 +629,7 @@ func (m *GetSignalInvitationInfoStartAppResp) Reset() { *m = GetSignalIn
func (m *GetSignalInvitationInfoStartAppResp) String() string { return proto.CompactTextString(m) }
func (*GetSignalInvitationInfoStartAppResp) ProtoMessage() {}
func (*GetSignalInvitationInfoStartAppResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{12}
return fileDescriptor_third_aac767b0c26bb83e, []int{12}
}
func (m *GetSignalInvitationInfoStartAppResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSignalInvitationInfoStartAppResp.Unmarshal(m, b)
@ -669,7 +677,7 @@ func (m *FcmUpdateTokenReq) Reset() { *m = FcmUpdateTokenReq{} }
func (m *FcmUpdateTokenReq) String() string { return proto.CompactTextString(m) }
func (*FcmUpdateTokenReq) ProtoMessage() {}
func (*FcmUpdateTokenReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{13}
return fileDescriptor_third_aac767b0c26bb83e, []int{13}
}
func (m *FcmUpdateTokenReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FcmUpdateTokenReq.Unmarshal(m, b)
@ -727,7 +735,7 @@ func (m *FcmUpdateTokenResp) Reset() { *m = FcmUpdateTokenResp{} }
func (m *FcmUpdateTokenResp) String() string { return proto.CompactTextString(m) }
func (*FcmUpdateTokenResp) ProtoMessage() {}
func (*FcmUpdateTokenResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{14}
return fileDescriptor_third_aac767b0c26bb83e, []int{14}
}
func (m *FcmUpdateTokenResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FcmUpdateTokenResp.Unmarshal(m, b)
@ -759,7 +767,7 @@ func (m *SetAppBadgeReq) Reset() { *m = SetAppBadgeReq{} }
func (m *SetAppBadgeReq) String() string { return proto.CompactTextString(m) }
func (*SetAppBadgeReq) ProtoMessage() {}
func (*SetAppBadgeReq) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{15}
return fileDescriptor_third_aac767b0c26bb83e, []int{15}
}
func (m *SetAppBadgeReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetAppBadgeReq.Unmarshal(m, b)
@ -803,7 +811,7 @@ func (m *SetAppBadgeResp) Reset() { *m = SetAppBadgeResp{} }
func (m *SetAppBadgeResp) String() string { return proto.CompactTextString(m) }
func (*SetAppBadgeResp) ProtoMessage() {}
func (*SetAppBadgeResp) Descriptor() ([]byte, []int) {
return fileDescriptor_third_85db3e967ff9b8c1, []int{16}
return fileDescriptor_third_aac767b0c26bb83e, []int{16}
}
func (m *SetAppBadgeResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetAppBadgeResp.Unmarshal(m, b)
@ -1146,55 +1154,56 @@ var _Third_serviceDesc = grpc.ServiceDesc{
Metadata: "third/third.proto",
}
func init() { proto.RegisterFile("third/third.proto", fileDescriptor_third_85db3e967ff9b8c1) }
var fileDescriptor_third_85db3e967ff9b8c1 = []byte{
// 746 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xc1, 0x6e, 0xda, 0x4a,
0x14, 0x95, 0x21, 0xf0, 0xc2, 0x25, 0x8f, 0xbc, 0x8c, 0xa2, 0xf7, 0x90, 0x5f, 0x9a, 0x90, 0x89,
0x92, 0xb2, 0x09, 0x48, 0xa9, 0xd4, 0x56, 0x6a, 0x55, 0x35, 0x49, 0x45, 0x44, 0x55, 0x14, 0x64,
0x42, 0x17, 0xdd, 0x54, 0x2e, 0x0c, 0x60, 0xc5, 0x8c, 0xa7, 0x33, 0xe3, 0xa4, 0xcd, 0x0f, 0x54,
0x55, 0x77, 0xfd, 0x9a, 0x2e, 0xfb, 0x01, 0xfd, 0xa8, 0xca, 0x63, 0x1b, 0x6c, 0xb0, 0x21, 0xe9,
0xa6, 0xdd, 0x58, 0x33, 0xc7, 0xe7, 0x9e, 0x39, 0x73, 0x7d, 0xef, 0x05, 0xd8, 0x90, 0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 0x7f, 0x29, 0x8d, 0x80, 0x6a, 0x29, 0xa1, 0x29,
0xf3, 0x46, 0xaf, 0xdf, 0x89, 0x2f, 0x18, 0xfa, 0xaa, 0xc1, 0xce, 0x92, 0x2e, 0x44, 0x0f, 0xef,
0x20, 0x1a, 0xe9, 0x7c, 0xfd, 0xd1, 0x2f, 0xc5, 0x09, 0x86, 0xde, 0x42, 0x29, 0x5e, 0xcb, 0x68,
0x3f, 0x49, 0x6a, 0xae, 0xf5, 0xf4, 0x83, 0xdb, 0xd0, 0x04, 0x43, 0xaf, 0xa1, 0x18, 0x29, 0x62,
0x94, 0xf8, 0xb5, 0xe3, 0x7d, 0xa3, 0xef, 0x2d, 0xe5, 0x08, 0x76, 0xb2, 0xfd, 0x66, 0xcb, 0x67,
0x45, 0xfe, 0x13, 0x29, 0xe6, 0x13, 0xf5, 0x7c, 0x97, 0x57, 0xd0, 0x83, 0x9f, 0x01, 0x00, 0x00,
0xff, 0xff, 0x14, 0x1d, 0x29, 0xf8, 0x69, 0x09, 0x00, 0x00,
func init() { proto.RegisterFile("third/third.proto", fileDescriptor_third_aac767b0c26bb83e) }
var fileDescriptor_third_aac767b0c26bb83e = []byte{
// 754 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xdf, 0x6e, 0xd3, 0x3e,
0x18, 0x55, 0xda, 0xb5, 0x5b, 0xbf, 0xee, 0xd7, 0xfd, 0x66, 0x4d, 0x10, 0x85, 0xb1, 0x75, 0x9e,
0x36, 0x7a, 0xb3, 0x56, 0x1a, 0x12, 0x7f, 0x04, 0x42, 0x6c, 0x43, 0x9d, 0x8a, 0xa8, 0x56, 0xa5,
0x2b, 0x17, 0xdc, 0xa0, 0xd0, 0xba, 0x6d, 0xb4, 0x34, 0x31, 0xb6, 0xb3, 0xc1, 0x5e, 0x00, 0x21,
0xee, 0x78, 0x1a, 0x2e, 0x79, 0x00, 0x1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0xf3,
0x5e, 0x73, 0x8a, 0xda, 0x00, 0x93, 0x7b, 0x17, 0xed, 0x24, 0xb1, 0x63, 0xd7, 0xb7, 0x86, 0x17,
0x51, 0xc6, 0xee, 0x3a, 0xcc, 0x4a, 0x75, 0xe7, 0x5f, 0xe2, 0xa9, 0xee, 0xc2, 0x8b, 0xfa, 0x1a,
0xee, 0xa6, 0x04, 0x01, 0x55, 0x53, 0x4a, 0x53, 0xee, 0x1b, 0xad, 0x76, 0x2b, 0x3e, 0xa7, 0xe8,
0xbb, 0x02, 0xdb, 0x0b, 0x52, 0x88, 0x1e, 0xdd, 0x42, 0x34, 0x92, 0x7c, 0xed, 0xf1, 0x1f, 0xd5,
0x71, 0x8a, 0xde, 0x43, 0x29, 0x7e, 0x96, 0xd1, 0x5e, 0x92, 0xd4, 0x4c, 0xf4, 0xb4, 0xfd, 0x9b,
0xd0, 0x38, 0x45, 0x6f, 0xa1, 0x18, 0x39, 0xc4, 0x28, 0xf1, 0x6b, 0xc7, 0x73, 0xa3, 0xed, 0x2e,
0xe4, 0x70, 0x7a, 0xbc, 0xf5, 0x6e, 0xd3, 0x67, 0x45, 0xfe, 0x2d, 0x49, 0xe6, 0x33, 0xf9, 0xfc,
0x90, 0x97, 0xd0, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87, 0x96, 0xee, 0x73, 0x83, 0x09,
0x00, 0x00,
}

@ -28,7 +28,8 @@ message ConfirmPutResp {
}
message GetUrlReq {
string name = 1;
string name = 1; //
int64 expires = 2; // url
}
message GetUrlResp {

Loading…
Cancel
Save