demonapi

package
v0.0.0-...-cd5d9f3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeList = "List"
	ModeGet  = "Get"
	ModePut  = "Put"
)
View Source
const PrintTiming = false

Variables

This section is empty.

Functions

This section is empty.

Types

type Clerk

type Clerk struct {
	Client http.Client
	Config ClerkConfig
}

func (*Clerk) DeviceName

func (c *Clerk) DeviceName() (string, error)

func (*Clerk) GetObject

func (c *Clerk) GetObject(path string) ([]byte, error)

func (*Clerk) GetObjectStream

func (c *Clerk) GetObjectStream(path string) (io.ReadCloser, error)

func (*Clerk) ListObjectsV2

func (c *Clerk) ListObjectsV2(continuationToken *string) (*s3.ListObjectsV2Output, error)

func (*Clerk) PutObject

func (c *Clerk) PutObject(pathInfix string, data []byte) (string, error)

PutObject returns the created filename.

func (*Clerk) PutObjectStream

func (c *Clerk) PutObjectStream(pathInfix string, data io.ReadSeeker) (string, error)

Note: this WILL seek the stream to position 0 before beginning

type ClerkConfig

type ClerkConfig struct {
	URL         string `json:"url"`
	SpacePrefix string `json:"prefix"`
	DeviceName  string `json:"device"`
	DeviceToken string `json:"token"`
}

Jump to

Keyboard shortcuts

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