kopiarepo

package
v0.0.0-...-2f979d4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Overview

* Copyright 2021 the Astrolabe contributors * SPDX-License-Identifier: Apache-2.0 * 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.

* Copyright 2021 the Astrolabe contributors * SPDX-License-Identifier: Apache-2.0 * 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.

* Copyright 2021 the Astrolabe contributors * SPDX-License-Identifier: Apache-2.0 * 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.

* Copyright 2021 the Astrolabe contributors * SPDX-License-Identifier: Apache-2.0 * 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 CONFIG_DIR = "configs"
View Source
const CONFIG_FILE_EXT = ".kopia"
View Source
const DATA_SUFFIX = ".data"
View Source
const MD_SUFFIX = ".md"
View Source
const PE_FS_STORAGE_DIR = "pes"
View Source
const PE_S3CONFIG_FILE = "s3_config.json"

Variables

This section is empty.

Functions

func NewKopiaRepositoryProtectedEntityManager

func NewKopiaRepositoryProtectedEntityManager(repoDir string, logger logrus.FieldLogger) (astrolabe.ProtectedEntityManager, error)

Types

type DummyReadSeekerCloser

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

func (DummyReadSeekerCloser) Close

func (recv DummyReadSeekerCloser) Close() error

func (DummyReadSeekerCloser) Read

func (recv DummyReadSeekerCloser) Read(buf []byte) (n int, err error)

func (DummyReadSeekerCloser) Seek

func (recv DummyReadSeekerCloser) Seek(offset int64, whence int) (int64, error)

type ProtectedEntity

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

func NewProtectedEntityFromJSONBuf

func NewProtectedEntityFromJSONBuf(rpetm *ProtectedEntityTypeManager, respository repo.Repository,
	source snapshot.SourceInfo, buf []byte) (pe ProtectedEntity, err error)

func NewProtectedEntityFromJSONReader

func NewProtectedEntityFromJSONReader(rpetm *ProtectedEntityTypeManager, respository repo.Repository,
	source snapshot.SourceInfo, reader io.Reader) (pe ProtectedEntity, err error)

func (ProtectedEntity) DeleteSnapshot

func (recv ProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, params map[string]map[string]interface{}) (bool, error)

func (ProtectedEntity) GetCombinedInfo

func (recv ProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)

func (ProtectedEntity) GetComponents

func (recv ProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)

func (ProtectedEntity) GetDataReader

func (recv ProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)

func (ProtectedEntity) GetID

func (ProtectedEntity) GetInfo

func (ProtectedEntity) GetInfoForSnapshot

func (ProtectedEntity) GetMetadataReader

func (recv ProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)

func (ProtectedEntity) ListSnapshots

func (ProtectedEntity) Overwrite

func (recv ProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, params map[string]map[string]interface{}, overwriteComponents bool) error

func (ProtectedEntity) Snapshot

func (recv ProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)

type ProtectedEntityKopiaEntry

type ProtectedEntityKopiaEntry struct {
}

type ProtectedEntityKopiaFile

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

func NewProtectedEntityKopiaFile

func NewProtectedEntityKopiaFile(ctx context.Context, pe *ProtectedEntity) (ProtectedEntityKopiaFile, error)

func NewProtectedEntityKopiaFileWithReaders

func NewProtectedEntityKopiaFileWithReaders(ctx context.Context, pe *ProtectedEntity, dataReader io.ReadCloser,
	metadataReader io.ReadCloser) (ProtectedEntityKopiaFile, error)

func (ProtectedEntityKopiaFile) Child

func (recv ProtectedEntityKopiaFile) Child(ctx context.Context, name string) (fs.Entry, error)

func (ProtectedEntityKopiaFile) Device

func (recv ProtectedEntityKopiaFile) Device() fs.DeviceInfo

func (ProtectedEntityKopiaFile) IsDir

func (recv ProtectedEntityKopiaFile) IsDir() bool

func (ProtectedEntityKopiaFile) LocalFilesystemPath

func (recv ProtectedEntityKopiaFile) LocalFilesystemPath() string

func (ProtectedEntityKopiaFile) ModTime

func (recv ProtectedEntityKopiaFile) ModTime() time.Time

func (ProtectedEntityKopiaFile) Mode

func (recv ProtectedEntityKopiaFile) Mode() os.FileMode

func (ProtectedEntityKopiaFile) Name

func (recv ProtectedEntityKopiaFile) Name() string

func (ProtectedEntityKopiaFile) Owner

func (recv ProtectedEntityKopiaFile) Owner() fs.OwnerInfo

func (ProtectedEntityKopiaFile) Readdir

func (recv ProtectedEntityKopiaFile) Readdir(ctx context.Context) (fs.Entries, error)

func (ProtectedEntityKopiaFile) Size

func (recv ProtectedEntityKopiaFile) Size() int64

func (ProtectedEntityKopiaFile) Sys

func (recv ProtectedEntityKopiaFile) Sys() interface{}

type ProtectedEntityTypeManager

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

func NewProtectedEntityTypeManager

func NewProtectedEntityTypeManager(ctx context.Context, typeName string, repository repo.Repository,
	logger logrus.FieldLogger) (ProtectedEntityTypeManager, error)

func (ProtectedEntityTypeManager) Copy

func (ProtectedEntityTypeManager) CopyFromInfo

func (ProtectedEntityTypeManager) Delete

func (ProtectedEntityTypeManager) GetCapabilities

func (this ProtectedEntityTypeManager) GetCapabilities() map[string]string

func (ProtectedEntityTypeManager) GetProtectedEntities

func (recv ProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)

func (ProtectedEntityTypeManager) GetProtectedEntity

func (ProtectedEntityTypeManager) GetTypeName

func (recv ProtectedEntityTypeManager) GetTypeName() string

type RepositoryProtectedEntityManager

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

func (RepositoryProtectedEntityManager) GetProtectedEntity

func (RepositoryProtectedEntityManager) GetProtectedEntityTypeManager

func (recv RepositoryProtectedEntityManager) GetProtectedEntityTypeManager(peType string) astrolabe.ProtectedEntityTypeManager

func (RepositoryProtectedEntityManager) ListEntityTypeManagers

type StreamEntry

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

func NewStreamEntry

func NewStreamEntry(name string, size int64, modTime time.Time, reader io.ReadCloser, path string) StreamEntry

func (StreamEntry) Device

func (recv StreamEntry) Device() fs.DeviceInfo

func (StreamEntry) IsDir

func (recv StreamEntry) IsDir() bool

func (StreamEntry) LocalFilesystemPath

func (recv StreamEntry) LocalFilesystemPath() string

func (StreamEntry) ModTime

func (recv StreamEntry) ModTime() time.Time

func (StreamEntry) Mode

func (recv StreamEntry) Mode() os.FileMode

func (StreamEntry) Name

func (recv StreamEntry) Name() string

func (StreamEntry) Open

func (recv StreamEntry) Open(ctx context.Context) (fs.Reader, error)

func (StreamEntry) Owner

func (recv StreamEntry) Owner() fs.OwnerInfo

func (StreamEntry) Size

func (recv StreamEntry) Size() int64

func (StreamEntry) Sys

func (recv StreamEntry) Sys() interface{}

type StreamReader

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

func NewStreamReader

func NewStreamReader(reader io.ReadCloser, entry fs.Entry) (StreamReader, error)

func (StreamReader) Close

func (recv StreamReader) Close() error

func (StreamReader) Entry

func (recv StreamReader) Entry() (fs.Entry, error)

func (StreamReader) Read

func (recv StreamReader) Read(p []byte) (n int, err error)

func (StreamReader) Seek

func (recv StreamReader) Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

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