s3

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	AccessKeyID      string `yaml:"accessKeyId" jsonschema:"required"`
	SecretAccessKey  string `yaml:"secretAccessKey" jsonschema:"required"`
	SessionToken     string `yaml:"sessionToken,omitempty"`
	Endpoint         string `yaml:"endpoint,omitempty"`
	Region           string `yaml:"region,omitempty"`
	S3ForcePathStyle bool   `yaml:"s3ForcePathStyle,omitempty"`
}

func NewCredentials

func NewCredentials(accessKeyID, secretAccessKey string) *Credentials

func NewCredentialsFromEnv

func NewCredentialsFromEnv() *Credentials

Create new credentials from the standard AWS environment variables.

func (*Credentials) AWSConfig

func (c *Credentials) AWSConfig() *aws.Config

func (*Credentials) GetAccessKeyID

func (c *Credentials) GetAccessKeyID() string

func (*Credentials) GetEndpoint

func (c *Credentials) GetEndpoint() string

func (*Credentials) GetRegion

func (c *Credentials) GetRegion() string

func (*Credentials) GetS3ForcePathStyle

func (c *Credentials) GetS3ForcePathStyle() bool

func (*Credentials) GetSecretAccessKey

func (c *Credentials) GetSecretAccessKey() string

func (*Credentials) GetSessionToken

func (c *Credentials) GetSessionToken() string

func (*Credentials) WithAccessKeyID

func (c *Credentials) WithAccessKeyID(id string) *Credentials

func (*Credentials) WithEndpoint

func (c *Credentials) WithEndpoint(endpoint string) *Credentials

func (*Credentials) WithRegion

func (c *Credentials) WithRegion(region string) *Credentials

func (*Credentials) WithS3ForcePathStyle

func (c *Credentials) WithS3ForcePathStyle(forcePathStyle bool) *Credentials

func (*Credentials) WithSecretAccessKey

func (c *Credentials) WithSecretAccessKey(key string) *Credentials

func (*Credentials) WithSessionToken

func (c *Credentials) WithSessionToken(token string) *Credentials

type CredentialsInterface

type CredentialsInterface interface {
	GetAccessKeyID() string
	GetSecretAccessKey() string
	GetSessionToken() string
	GetRegion() string
	GetEndpoint() string
	GetS3ForcePathStyle() bool
	AWSConfig() *aws.Config
}

type LocalRuntime

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

func NewLocalRuntime

func NewLocalRuntime() *LocalRuntime

func (*LocalRuntime) Sync

func (lr *LocalRuntime) Sync(ctx *contexts.Context, credentials CredentialsInterface, src string, dest string) (err error)

type MockCredentialsInterface

type MockCredentialsInterface struct {
	mock.Mock
}

MockCredentialsInterface is an autogenerated mock type for the CredentialsInterface type

func NewMockCredentialsInterface

func NewMockCredentialsInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockCredentialsInterface

NewMockCredentialsInterface creates a new instance of MockCredentialsInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockCredentialsInterface) AWSConfig

func (_m *MockCredentialsInterface) AWSConfig() *aws.Config

AWSConfig provides a mock function with no fields

func (*MockCredentialsInterface) EXPECT

func (*MockCredentialsInterface) GetAccessKeyID

func (_m *MockCredentialsInterface) GetAccessKeyID() string

GetAccessKeyID provides a mock function with no fields

func (*MockCredentialsInterface) GetEndpoint

func (_m *MockCredentialsInterface) GetEndpoint() string

GetEndpoint provides a mock function with no fields

func (*MockCredentialsInterface) GetRegion

func (_m *MockCredentialsInterface) GetRegion() string

GetRegion provides a mock function with no fields

func (*MockCredentialsInterface) GetS3ForcePathStyle

func (_m *MockCredentialsInterface) GetS3ForcePathStyle() bool

GetS3ForcePathStyle provides a mock function with no fields

func (*MockCredentialsInterface) GetSecretAccessKey

func (_m *MockCredentialsInterface) GetSecretAccessKey() string

GetSecretAccessKey provides a mock function with no fields

func (*MockCredentialsInterface) GetSessionToken

func (_m *MockCredentialsInterface) GetSessionToken() string

GetSessionToken provides a mock function with no fields

type MockCredentialsInterface_AWSConfig_Call

type MockCredentialsInterface_AWSConfig_Call struct {
	*mock.Call
}

MockCredentialsInterface_AWSConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AWSConfig'

func (*MockCredentialsInterface_AWSConfig_Call) Return

func (*MockCredentialsInterface_AWSConfig_Call) Run

func (*MockCredentialsInterface_AWSConfig_Call) RunAndReturn

type MockCredentialsInterface_Expecter

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

func (*MockCredentialsInterface_Expecter) AWSConfig

AWSConfig is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetAccessKeyID

GetAccessKeyID is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetEndpoint

GetEndpoint is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetRegion

GetRegion is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetS3ForcePathStyle

GetS3ForcePathStyle is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetSecretAccessKey

GetSecretAccessKey is a helper method to define mock.On call

func (*MockCredentialsInterface_Expecter) GetSessionToken

GetSessionToken is a helper method to define mock.On call

type MockCredentialsInterface_GetAccessKeyID_Call

type MockCredentialsInterface_GetAccessKeyID_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetAccessKeyID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAccessKeyID'

func (*MockCredentialsInterface_GetAccessKeyID_Call) Return

func (*MockCredentialsInterface_GetAccessKeyID_Call) Run

func (*MockCredentialsInterface_GetAccessKeyID_Call) RunAndReturn

type MockCredentialsInterface_GetEndpoint_Call

type MockCredentialsInterface_GetEndpoint_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEndpoint'

func (*MockCredentialsInterface_GetEndpoint_Call) Return

func (*MockCredentialsInterface_GetEndpoint_Call) Run

func (*MockCredentialsInterface_GetEndpoint_Call) RunAndReturn

type MockCredentialsInterface_GetRegion_Call

type MockCredentialsInterface_GetRegion_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetRegion_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRegion'

func (*MockCredentialsInterface_GetRegion_Call) Return

func (*MockCredentialsInterface_GetRegion_Call) Run

func (*MockCredentialsInterface_GetRegion_Call) RunAndReturn

type MockCredentialsInterface_GetS3ForcePathStyle_Call

type MockCredentialsInterface_GetS3ForcePathStyle_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetS3ForcePathStyle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetS3ForcePathStyle'

func (*MockCredentialsInterface_GetS3ForcePathStyle_Call) Return

func (*MockCredentialsInterface_GetS3ForcePathStyle_Call) Run

func (*MockCredentialsInterface_GetS3ForcePathStyle_Call) RunAndReturn

type MockCredentialsInterface_GetSecretAccessKey_Call

type MockCredentialsInterface_GetSecretAccessKey_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetSecretAccessKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSecretAccessKey'

func (*MockCredentialsInterface_GetSecretAccessKey_Call) Return

func (*MockCredentialsInterface_GetSecretAccessKey_Call) Run

func (*MockCredentialsInterface_GetSecretAccessKey_Call) RunAndReturn

type MockCredentialsInterface_GetSessionToken_Call

type MockCredentialsInterface_GetSessionToken_Call struct {
	*mock.Call
}

MockCredentialsInterface_GetSessionToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionToken'

func (*MockCredentialsInterface_GetSessionToken_Call) Return

func (*MockCredentialsInterface_GetSessionToken_Call) Run

func (*MockCredentialsInterface_GetSessionToken_Call) RunAndReturn

type MockRuntime

type MockRuntime struct {
	mock.Mock
}

MockRuntime is an autogenerated mock type for the Runtime type

func NewMockRuntime

func NewMockRuntime(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRuntime

NewMockRuntime creates a new instance of MockRuntime. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockRuntime) EXPECT

func (_m *MockRuntime) EXPECT() *MockRuntime_Expecter

func (*MockRuntime) Sync

func (_m *MockRuntime) Sync(ctx *contexts.Context, credentials CredentialsInterface, src string, dest string) error

Sync provides a mock function with given fields: ctx, credentials, src, dest

type MockRuntime_Expecter

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

func (*MockRuntime_Expecter) Sync

func (_e *MockRuntime_Expecter) Sync(ctx interface{}, credentials interface{}, src interface{}, dest interface{}) *MockRuntime_Sync_Call

Sync is a helper method to define mock.On call

  • ctx *contexts.Context
  • credentials CredentialsInterface
  • src string
  • dest string

type MockRuntime_Sync_Call

type MockRuntime_Sync_Call struct {
	*mock.Call
}

MockRuntime_Sync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Sync'

func (*MockRuntime_Sync_Call) Return

func (*MockRuntime_Sync_Call) Run

func (_c *MockRuntime_Sync_Call) Run(run func(ctx *contexts.Context, credentials CredentialsInterface, src string, dest string)) *MockRuntime_Sync_Call

func (*MockRuntime_Sync_Call) RunAndReturn

type MocksyncManager

type MocksyncManager struct {
	mock.Mock
}

MocksyncManager is an autogenerated mock type for the syncManager type

func NewMocksyncManager

func NewMocksyncManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MocksyncManager

NewMocksyncManager creates a new instance of MocksyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MocksyncManager) EXPECT

func (*MocksyncManager) SyncWithContext

func (_m *MocksyncManager) SyncWithContext(ctx context.Context, src string, dest string) error

SyncWithContext provides a mock function with given fields: ctx, src, dest

type MocksyncManager_Expecter

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

func (*MocksyncManager_Expecter) SyncWithContext

func (_e *MocksyncManager_Expecter) SyncWithContext(ctx interface{}, src interface{}, dest interface{}) *MocksyncManager_SyncWithContext_Call

SyncWithContext is a helper method to define mock.On call

  • ctx context.Context
  • src string
  • dest string

type MocksyncManager_SyncWithContext_Call

type MocksyncManager_SyncWithContext_Call struct {
	*mock.Call
}

MocksyncManager_SyncWithContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncWithContext'

func (*MocksyncManager_SyncWithContext_Call) Return

func (*MocksyncManager_SyncWithContext_Call) Run

func (*MocksyncManager_SyncWithContext_Call) RunAndReturn

type Runtime

type Runtime interface {
	Sync(ctx *contexts.Context, credentials CredentialsInterface, src string, dest string) error
}

Represents a place (i.e. local or remote) where commands can run.

Jump to

Keyboard shortcuts

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