s3up

package
v0.0.0-...-6222ca5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright 2022 CodeNotary, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const BUFFERSIZE = 5242880

Variables

View Source
var (
	UseSHA256 = false

	Loglevel = 0
)

set it to TRUE to enable sha256 part checksum (?? must be also enabled on s3??)

Functions

This section is empty.

Types

type S3Uploader

type S3Uploader struct {
	// contains filtered or unexported fields
}

func Open

func Open(key, bucket, region, access_key, secret_key string) (s3 *S3Uploader, err error)

func (*S3Uploader) Close

func (s3 *S3Uploader) Close() (err error)

func (*S3Uploader) Flush

func (s3 *S3Uploader) Flush() (err error)

func (*S3Uploader) SignedRequestV4

func (s *S3Uploader) SignedRequestV4(
	reqUrl string,
	method string,
	body io.Reader,
	contentType string,
	contentSha256 []byte,
	setupRequest func(req *http.Request) error,
	t time.Time,
) (
	*http.Request,
	error,
)

func (*S3Uploader) Write

func (s3 *S3Uploader) Write(p []byte) (int, error)

func (*S3Uploader) Write1

func (s3 *S3Uploader) Write1(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL