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
- func NewKopiaRepositoryProtectedEntityManager(repoDir string, logger logrus.FieldLogger) (astrolabe.ProtectedEntityManager, error)
- type DummyReadSeekerCloser
- type ProtectedEntity
- func (recv ProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, ...) (bool, error)
- func (recv ProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)
- func (recv ProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)
- func (recv ProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)
- func (recv ProtectedEntity) GetID() astrolabe.ProtectedEntityID
- func (recv ProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
- func (recv ProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
- func (recv ProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
- func (recv ProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
- func (recv ProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, ...) error
- func (recv ProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)
- type ProtectedEntityKopiaEntry
- type ProtectedEntityKopiaFile
- func (recv ProtectedEntityKopiaFile) Child(ctx context.Context, name string) (fs.Entry, error)
- func (recv ProtectedEntityKopiaFile) Device() fs.DeviceInfo
- func (recv ProtectedEntityKopiaFile) IsDir() bool
- func (recv ProtectedEntityKopiaFile) LocalFilesystemPath() string
- func (recv ProtectedEntityKopiaFile) ModTime() time.Time
- func (recv ProtectedEntityKopiaFile) Mode() os.FileMode
- func (recv ProtectedEntityKopiaFile) Name() string
- func (recv ProtectedEntityKopiaFile) Owner() fs.OwnerInfo
- func (recv ProtectedEntityKopiaFile) Readdir(ctx context.Context) (fs.Entries, error)
- func (recv ProtectedEntityKopiaFile) Size() int64
- func (recv ProtectedEntityKopiaFile) Sys() interface{}
- type ProtectedEntityTypeManager
- func (recv ProtectedEntityTypeManager) Copy(ctx context.Context, sourcePE astrolabe.ProtectedEntity, ...) (astrolabe.ProtectedEntity, error)
- func (recv ProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, info astrolabe.ProtectedEntityInfo, ...) (astrolabe.ProtectedEntity, error)
- func (recv ProtectedEntityTypeManager) Delete(ctx context.Context, id astrolabe.ProtectedEntityID) error
- func (this ProtectedEntityTypeManager) GetCapabilities() map[string]string
- func (recv ProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)
- func (recv ProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
- func (recv ProtectedEntityTypeManager) GetTypeName() string
- type RepositoryProtectedEntityManager
- func (recv RepositoryProtectedEntityManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
- func (recv RepositoryProtectedEntityManager) GetProtectedEntityTypeManager(peType string) astrolabe.ProtectedEntityTypeManager
- func (recv RepositoryProtectedEntityManager) ListEntityTypeManagers() []astrolabe.ProtectedEntityTypeManager
- type StreamEntry
- func (recv StreamEntry) Device() fs.DeviceInfo
- func (recv StreamEntry) IsDir() bool
- func (recv StreamEntry) LocalFilesystemPath() string
- func (recv StreamEntry) ModTime() time.Time
- func (recv StreamEntry) Mode() os.FileMode
- func (recv StreamEntry) Name() string
- func (recv StreamEntry) Open(ctx context.Context) (fs.Reader, error)
- func (recv StreamEntry) Owner() fs.OwnerInfo
- func (recv StreamEntry) Size() int64
- func (recv StreamEntry) Sys() interface{}
- type StreamReader
Constants ¶
const CONFIG_DIR = "configs"
const CONFIG_FILE_EXT = ".kopia"
const DATA_SUFFIX = ".data"
const MD_SUFFIX = ".md"
const PE_FS_STORAGE_DIR = "pes"
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
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 (recv ProtectedEntity) GetID() astrolabe.ProtectedEntityID
func (ProtectedEntity) GetInfo ¶
func (recv ProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
func (ProtectedEntity) GetInfoForSnapshot ¶
func (recv ProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
func (ProtectedEntity) GetMetadataReader ¶
func (recv ProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
func (ProtectedEntity) ListSnapshots ¶
func (recv ProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
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) 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) 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 (recv ProtectedEntityTypeManager) Copy(ctx context.Context, sourcePE astrolabe.ProtectedEntity, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
func (ProtectedEntityTypeManager) CopyFromInfo ¶
func (recv ProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, info astrolabe.ProtectedEntityInfo, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
func (ProtectedEntityTypeManager) Delete ¶
func (recv ProtectedEntityTypeManager) Delete(ctx context.Context, id astrolabe.ProtectedEntityID) error
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 (recv ProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
func (ProtectedEntityTypeManager) GetTypeName ¶
func (recv ProtectedEntityTypeManager) GetTypeName() string
type RepositoryProtectedEntityManager ¶
type RepositoryProtectedEntityManager struct {
// contains filtered or unexported fields
}
func (RepositoryProtectedEntityManager) GetProtectedEntity ¶
func (recv RepositoryProtectedEntityManager) GetProtectedEntity(ctx context.Context, id astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
func (RepositoryProtectedEntityManager) GetProtectedEntityTypeManager ¶
func (recv RepositoryProtectedEntityManager) GetProtectedEntityTypeManager(peType string) astrolabe.ProtectedEntityTypeManager
func (RepositoryProtectedEntityManager) ListEntityTypeManagers ¶
func (recv RepositoryProtectedEntityManager) ListEntityTypeManagers() []astrolabe.ProtectedEntityTypeManager
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) 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