Documentation ¶
Index ¶
- Variables
- type ProjectApplication
- func (a *ProjectApplication) AddProviders(ctx context.Context, opts ...ProviderOption) ([]*provider.Provider, error)
- func (a *ProjectApplication) CreateProject(ctx context.Context, name string, opts ...ProjectOption) (*project.Project, error)
- func (a *ProjectApplication) EncryptProjectShares(ctx context.Context, externalPart string) error
- func (a *ProjectApplication) GetProject(ctx context.Context) (*project.Project, error)
- func (a *ProjectApplication) GetProviderDetail(ctx context.Context, providerID string) (*provider.Provider, error)
- func (a *ProjectApplication) GetProviders(ctx context.Context) ([]*provider.Provider, error)
- func (a *ProjectApplication) RegisterEncryptionKey(ctx context.Context) (string, error)
- func (a *ProjectApplication) RegisterEncryptionSession(ctx context.Context, encryptionPart string) (string, error)
- func (a *ProjectApplication) RemoveProvider(ctx context.Context, providerID string) error
- func (a *ProjectApplication) UpdateProvider(ctx context.Context, providerID string, opts ...ProviderOption) error
- type ProjectOption
- type ProviderOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProjectNotFound = errors.New("project not found") ErrNoProviderSpecified = errors.New("no provider specified") ErrProviderMismatch = errors.New("provider mismatch") ErrKeyTypeNotSpecified = errors.New("key type not specified") ErrInvalidProviderConfig = errors.New("invalid provider config") ErrUnknownProviderType = errors.New("unknown provider type") ErrProviderAlreadyExists = errors.New("custom authentication already registered for this project") ErrProviderNotFound = errors.New("custom authentication not found") ErrInvalidEncryptionPart = errors.New("invalid encryption part") ErrInvalidEncryptionSession = errors.New("invalid encryption session") ErrEncryptionPartAlreadyExists = errors.New("encryption part already exists") ErrEncryptionNotConfigured = errors.New("encryption not configured") ErrJWKPemConflict = errors.New("jwk and pem cannot be set at the same time") ErrInternal = errors.New("internal error") )
Functions ¶
This section is empty.
Types ¶
type ProjectApplication ¶
type ProjectApplication struct {
// contains filtered or unexported fields
}
func New ¶
func New(projectSvc services.ProjectService, projectRepo repositories.ProjectRepository, providerSvc services.ProviderService, providerRepo repositories.ProviderRepository, sharesRepo repositories.ShareRepository, encryptionFactory factories.EncryptionFactory, encryptionPartsRepo repositories.EncryptionPartsRepository) *ProjectApplication
func (*ProjectApplication) AddProviders ¶
func (a *ProjectApplication) AddProviders(ctx context.Context, opts ...ProviderOption) ([]*provider.Provider, error)
func (*ProjectApplication) CreateProject ¶
func (a *ProjectApplication) CreateProject(ctx context.Context, name string, opts ...ProjectOption) (*project.Project, error)
func (*ProjectApplication) EncryptProjectShares ¶
func (a *ProjectApplication) EncryptProjectShares(ctx context.Context, externalPart string) error
func (*ProjectApplication) GetProject ¶
func (*ProjectApplication) GetProviderDetail ¶
func (*ProjectApplication) GetProviders ¶
func (*ProjectApplication) RegisterEncryptionKey ¶
func (a *ProjectApplication) RegisterEncryptionKey(ctx context.Context) (string, error)
func (*ProjectApplication) RegisterEncryptionSession ¶ added in v0.1.11
func (*ProjectApplication) RemoveProvider ¶
func (a *ProjectApplication) RemoveProvider(ctx context.Context, providerID string) error
func (*ProjectApplication) UpdateProvider ¶
func (a *ProjectApplication) UpdateProvider(ctx context.Context, providerID string, opts ...ProviderOption) error
type ProjectOption ¶
type ProjectOption func(options *projectOptions)
func WithEncryptionKey ¶
func WithEncryptionKey() ProjectOption
type ProviderOption ¶
type ProviderOption func(*providerConfig)
func WithCustomJWK ¶ added in v0.1.5
func WithCustomJWK(url string) ProviderOption
func WithCustomPEM ¶ added in v0.1.5
func WithCustomPEM(pem string, keyType provider.KeyType) ProviderOption
func WithOpenfort ¶
func WithOpenfort(openfortProjectID string) ProviderOption
Click to show internal directories.
Click to hide internal directories.