model

package
v0.0.0-...-92b1827 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketStatsV1

type BucketStatsV1 struct {
	Size     int64
	Files    int64
	Complete bool
}

type BucketV1

type BucketV1 struct {
	Name string
}

BucketV1 represents a bucket in a S3 storage

type ByProfileV1ID

type ByProfileV1ID []*ProfileV1

ByProfileV1ID is the accessor for sorting a list of profiles by their ID

func (ByProfileV1ID) Len

func (a ByProfileV1ID) Len() int

func (ByProfileV1ID) Less

func (a ByProfileV1ID) Less(i, j int) bool

func (ByProfileV1ID) Swap

func (a ByProfileV1ID) Swap(i, j int)

type ObjectV1

type ObjectV1 struct {
	Key          string
	LastModified time.Time
	OwnerName    string
	OwnerID      string
	Size         int64
}

ObjectV1 represents an object in a bucket

type ProfileV1

type ProfileV1 struct {
	ID        int64    `json:"id"`
	Name      string   `json:"name"`
	AccessKey string   `json:"access_key"`
	SecretKey string   `json:"secret_key"`
	Endpoint  string   `json:"endpoint"`
	SSL       bool     `json:"ssl"`
	PathStyle bool     `json:"path_style"`
	Region    string   `json:"region"`
	Buckets   []string `json:"buckets"`
}

ProfileV1 contains one user profile for accessing a S3 storage

func (*ProfileV1) ToAwsOptions

func (p *ProfileV1) ToAwsOptions() session.Options

ToAwsOptions generates the Options from the profile required for creating a new aws client connection

type SettingsV1

type SettingsV1 struct {
	Version  string       `json:"version"`
	Profiles []*ProfileV1 `json:"profiles"`
}

SettingsV1 defines the format of the settings file

Jump to

Keyboard shortcuts

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