file_model

package
v0.0.0-...-6dc645d Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileProjectI

type FileProjectI interface {
	AddStorage(ctx context.Context, storageObj storage.StorageI)
	GenerateRsaKeyPair(ctx context.Context, bits int)
	CompareProject(ctx context.Context, compareProject Project) (StoreCompare, error)
}

type Project

type Project struct {
	ProjectId   string                       `json:"project_id" eru:"required"`
	Storages    map[string]storage.StorageI  `json:"storages"`
	RsaKeyPairs map[string]erursa.RsaKeyPair `json:"rsa_keypairs"`
	AesKeys     map[string]eruaes.AesKey     `json:"aes_keys"`
}

func (*Project) AddStorage

func (prj *Project) AddStorage(ctx context.Context, storageObjI storage.StorageI) error

func (*Project) CompareProject

func (prj *Project) CompareProject(ctx context.Context, compareProject Project) (StoreCompare, error)

func (*Project) GenerateAesKey

func (prj *Project) GenerateAesKey(ctx context.Context, bits int, keyName string) (eruaes.AesKey, error)

func (*Project) GenerateRsaKeyPair

func (prj *Project) GenerateRsaKeyPair(ctx context.Context, bits int, keyPairName string) (erursa.RsaKeyPair, error)

type StoreCompare

type StoreCompare struct {
	DeleteStorages   []string
	NewStorages      []string
	MismatchStorages map[string]interface{}
	DeleteKeys       []string
	NewKeys          []string
	MismatchKeys     map[string]interface{}
}

Jump to

Keyboard shortcuts

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