File: model.go

package info (click to toggle)
golang-github-aliyun-aliyun-oss-go-sdk 1.5.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 584 kB
  • sloc: makefile: 6
file content (60 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package oss

import (
	"hash"
	"io"
	"net/http"
)

// Response Http response from oss
type Response struct {
	StatusCode int
	Headers    http.Header
	Body       io.ReadCloser
	ClientCRC  uint64
	ServerCRC  uint64
}

// PutObjectRequest The request of DoPutObject
type PutObjectRequest struct {
	ObjectKey string
	Reader    io.Reader
}

// GetObjectRequest The request of DoGetObject
type GetObjectRequest struct {
	ObjectKey string
}

// GetObjectResult The result of DoGetObject
type GetObjectResult struct {
	Response  *Response
	ClientCRC hash.Hash64
	ServerCRC uint64
}

// AppendObjectRequest  The requtest of DoAppendObject
type AppendObjectRequest struct {
	ObjectKey string
	Reader    io.Reader
	Position  int64
}

// AppendObjectResult The result of DoAppendObject
type AppendObjectResult struct {
	NextPosition int64
	CRC          uint64
}

// UploadPartRequest The request of DoUploadPart
type UploadPartRequest struct {
	InitResult *InitiateMultipartUploadResult
	Reader     io.Reader
	PartSize   int64
	PartNumber int
}

// UploadPartResult The result of DoUploadPart
type UploadPartResult struct {
	Part UploadPart
}