Documentation ¶
Index ¶
- Constants
- Variables
- func Decrypt(key, text []byte) ([]byte, error)
- func DeleteCollaboratorRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func Encrypt(key, text []byte) ([]byte, error)
- func GetCollaboratorsRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func GetFileContentType(out *os.File) (string, error)
- func GetFullRemotePath(localPath, remotePath string) string
- func GetRefsHash(r []byte) string
- func HttpDo(ctx context.Context, cncl context.CancelFunc, req *http.Request, ...) error
- func IsRemoteAbs(path string) bool
- func Join(a, b string) string
- func MakeSCRestAPICall(scAddress string, relativePath string, params map[string]string, ...) ([]byte, error)
- func NewAllocationRequest(baseUrl, allocation string) (*http.Request, error)
- func NewAttributesRequest(baseUrl, allocation string, body io.Reader) (req *http.Request, err error)
- func NewCalculateHashRequest(baseUrl, allocation string, paths []string) (*http.Request, error)
- func NewCollaboratorRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func NewCommitMetaTxnRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func NewCommitRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewConnectionId() string
- func NewCopyRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewCreateDirRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewDeleteRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewDownloadRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewFileMetaRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func NewFileStatsRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)
- func NewHTTPRequest(method string, url string, data []byte) (*http.Request, context.Context, context.CancelFunc, error)
- func NewListRequest(baseUrl, allocation string, path, pathHash string, auth_token string) (*http.Request, error)
- func NewObjectTreeRequest(baseUrl, allocation string, path string) (*http.Request, error)
- func NewReferencePathRequest(baseUrl, allocation string, paths []string) (*http.Request, error)
- func NewRefsRequest(...) (*http.Request, error)
- func NewRenameRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewRevokeShareRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewShareRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)
- func NewUploadRequest(baseUrl, allocation string, body io.Reader, update bool) (*http.Request, error)
- func NewUploadRequestWithMethod(baseURL, allocation string, body io.Reader, method string) (*http.Request, error)
- func RemoteClean(path string) string
- type HttpClient
- type SCRestAPIHandler
- type Uint128
- func (x Uint128) Add(y Uint128) Uint128
- func (x Uint128) Add64(y uint64) Uint128
- func (x Uint128) And(v Uint128) Uint128
- func (x Uint128) And64(y uint64) Uint128
- func (x Uint128) CountOnes() int
- func (x Uint128) Equals(y Uint128) bool
- func (x Uint128) Equals64(y uint64) bool
- func (x Uint128) Lsh(y uint64) Uint128
- func (x Uint128) Not() Uint128
- func (x Uint128) Or(v Uint128) Uint128
- func (x Uint128) Sub(y Uint128) Uint128
- func (x Uint128) Sub64(y uint64) Uint128
- func (x Uint128) TrailingZeros() int
- func (x Uint128) Xor(v Uint128) Uint128
Constants ¶
View Source
const ( ALLOCATION_ENDPOINT = "/allocation" UPLOAD_ENDPOINT = "/v1/file/upload/" ATTRS_ENDPOINT = "/v1/file/attributes/" RENAME_ENDPOINT = "/v1/file/rename/" COPY_ENDPOINT = "/v1/file/copy/" LIST_ENDPOINT = "/v1/file/list/" REFERENCE_ENDPOINT = "/v1/file/referencepath/" CONNECTION_ENDPOINT = "/v1/connection/details/" COMMIT_ENDPOINT = "/v1/connection/commit/" DOWNLOAD_ENDPOINT = "/v1/file/download/" LATEST_READ_MARKER = "/v1/readmarker/latest" FILE_META_ENDPOINT = "/v1/file/meta/" FILE_STATS_ENDPOINT = "/v1/file/stats/" OBJECT_TREE_ENDPOINT = "/v1/file/objecttree/" REFS_ENDPOINT = "/v1/file/refs/" COMMIT_META_TXN_ENDPOINT = "/v1/file/commitmetatxn/" COLLABORATOR_ENDPOINT = "/v1/file/collaborator/" CALCULATE_HASH_ENDPOINT = "/v1/file/calculatehash/" SHARE_ENDPOINT = "/v1/marketplace/shareinfo/" DIR_ENDPOINT = "/v1/dir/" // CLIENT_SIGNATURE_HEADER represents http request header contains signature. CLIENT_SIGNATURE_HEADER = "X-App-Client-Signature" )
View Source
const EncryptedFolderName = "encrypted"
View Source
const MAX_RETRIES = 5
View Source
const REGISTER_CLIENT = "v1/client/put"
View Source
const SC_REST_API_URL = "v1/screst/"
View Source
const SLEEP_BETWEEN_RETRIES = 5
Variables ¶
View Source
var DefaultTransport = &http.Transport{ Proxy: envProxy.Proxy, DialContext: (&net.Dialer{ Timeout: 45 * time.Second, KeepAlive: 45 * time.Second, DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, MaxIdleConnsPerHost: 100, }
Functions ¶
func GetCollaboratorsRequest ¶
func GetFullRemotePath ¶
func GetRefsHash ¶ added in v1.3.0
func IsRemoteAbs ¶
func MakeSCRestAPICall ¶
func NewAllocationRequest ¶
func NewAttributesRequest ¶
func NewCalculateHashRequest ¶
func NewCollaboratorRequest ¶
func NewCommitMetaTxnRequest ¶
func NewCommitRequest ¶
func NewCopyRequest ¶
func NewCreateDirRequest ¶
func NewDeleteRequest ¶
func NewDownloadRequest ¶
func NewFileMetaRequest ¶
func NewFileStatsRequest ¶
func NewHTTPRequest ¶
func NewListRequest ¶
func NewObjectTreeRequest ¶
func NewReferencePathRequest ¶
func NewRefsRequest ¶ added in v1.3.0
func NewRenameRequest ¶
func NewRevokeShareRequest ¶
func NewShareRequest ¶
func NewUploadRequest ¶
func NewUploadRequestWithMethod ¶ added in v1.2.88
func NewUploadRequestWithMethod(baseURL, allocation string, body io.Reader, method string) (*http.Request, error)
NewUploadRequestWithMethod create a http reqeust of upload
func RemoteClean ¶
Types ¶
type HttpClient ¶
var Client HttpClient
type SCRestAPIHandler ¶
type Uint128 ¶
type Uint128 struct {
// contains filtered or unexported fields
}
func NewUint128 ¶
func (Uint128) TrailingZeros ¶
TrailingZeros returns the number of trailing zero bits in x; the result is 128 for x == 0.
Click to show internal directories.
Click to hide internal directories.