app

package
v1.0.0-beta.187 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultPageNumber = 1
	DefaultPageSize   = 100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	AppAdapter

	entutils.TxCreator
}

type AppAdapter

type AppAdapter interface {
	// Marketplace
	RegisterMarketplaceListing(input appentity.RegisterMarketplaceListingInput) error
	GetMarketplaceListing(ctx context.Context, input appentity.MarketplaceGetInput) (appentity.RegistryItem, error)
	ListMarketplaceListings(ctx context.Context, input appentity.MarketplaceListInput) (pagination.PagedResponse[appentity.RegistryItem], error)
	InstallMarketplaceListingWithAPIKey(ctx context.Context, input appentity.InstallAppWithAPIKeyInput) (appentity.App, error)
	GetMarketplaceListingOauth2InstallURL(ctx context.Context, input appentity.GetOauth2InstallURLInput) (appentity.GetOauth2InstallURLOutput, error)
	AuthorizeMarketplaceListingOauth2Install(ctx context.Context, input appentity.AuthorizeOauth2InstallInput) error

	// Installed app
	CreateApp(ctx context.Context, input appentity.CreateAppInput) (appentitybase.AppBase, error)
	GetApp(ctx context.Context, input appentity.GetAppInput) (appentity.App, error)
	GetDefaultApp(ctx context.Context, input appentity.GetDefaultAppInput) (appentity.App, error)
	ListApps(ctx context.Context, input appentity.ListAppInput) (pagination.PagedResponse[appentity.App], error)
	UninstallApp(ctx context.Context, input appentity.UninstallAppInput) error

	// Customer data
	ListCustomerData(ctx context.Context, input ListCustomerInput) (pagination.PagedResponse[appentity.CustomerApp], error)
	EnsureCustomer(ctx context.Context, input EnsureCustomerInput) error
	DeleteCustomer(ctx context.Context, input DeleteCustomerInput) error
}

type AppDefaultNotFoundError

type AppDefaultNotFoundError struct {
	Namespace string
	Type      appentitybase.AppType
}

func (AppDefaultNotFoundError) Error

func (e AppDefaultNotFoundError) Error() string

type AppNotFoundError

type AppNotFoundError struct {
	appentitybase.AppID
}

func (AppNotFoundError) Error

func (e AppNotFoundError) Error() string

type AppProviderAuthenticationError

type AppProviderAuthenticationError struct {
	Namespace     string
	Type          appentitybase.AppType
	ProviderError error
}

func (AppProviderAuthenticationError) Error

type AppProviderError

type AppProviderError struct {
	Namespace     string
	Type          appentitybase.AppType
	ProviderError error
}

func (AppProviderError) Error

func (e AppProviderError) Error() string

type AppService

type AppService interface {
	// Marketplace
	RegisterMarketplaceListing(input appentity.RegisterMarketplaceListingInput) error
	GetMarketplaceListing(ctx context.Context, input appentity.MarketplaceGetInput) (appentity.RegistryItem, error)
	ListMarketplaceListings(ctx context.Context, input appentity.MarketplaceListInput) (pagination.PagedResponse[appentity.RegistryItem], error)
	InstallMarketplaceListingWithAPIKey(ctx context.Context, input appentity.InstallAppWithAPIKeyInput) (appentity.App, error)
	GetMarketplaceListingOauth2InstallURL(ctx context.Context, input appentity.GetOauth2InstallURLInput) (appentity.GetOauth2InstallURLOutput, error)
	AuthorizeMarketplaceListingOauth2Install(ctx context.Context, input appentity.AuthorizeOauth2InstallInput) error

	// Installed app
	CreateApp(ctx context.Context, input appentity.CreateAppInput) (appentitybase.AppBase, error)
	GetApp(ctx context.Context, input appentity.GetAppInput) (appentity.App, error)
	GetDefaultApp(ctx context.Context, input appentity.GetDefaultAppInput) (appentity.App, error)
	ListApps(ctx context.Context, input appentity.ListAppInput) (pagination.PagedResponse[appentity.App], error)
	UninstallApp(ctx context.Context, input appentity.UninstallAppInput) error

	// Customer data
	ListCustomerData(ctx context.Context, input ListCustomerInput) (pagination.PagedResponse[appentity.CustomerApp], error)
	EnsureCustomer(ctx context.Context, input EnsureCustomerInput) error
	DeleteCustomer(ctx context.Context, input DeleteCustomerInput) error
}

type CustomerPreConditionError

type CustomerPreConditionError struct {
	appentitybase.AppID
	AppType    appentitybase.AppType
	CustomerID customerentity.CustomerID
	Condition  string
}

func (CustomerPreConditionError) Error

func (CustomerPreConditionError) Validate

func (e CustomerPreConditionError) Validate() error

type DeleteCustomerInput

type DeleteCustomerInput struct {
	AppID      *appentitybase.AppID
	CustomerID customerentity.CustomerID
}

func (DeleteCustomerInput) Validate

func (a DeleteCustomerInput) Validate() error

type EnsureCustomerInput

type EnsureCustomerInput struct {
	AppID      appentitybase.AppID
	CustomerID customerentity.CustomerID
}

func (EnsureCustomerInput) Validate

func (a EnsureCustomerInput) Validate() error

type ListCustomerInput

type ListCustomerInput struct {
	pagination.Page
	CustomerID customerentity.CustomerID
	Type       *appentitybase.AppType
}

func (ListCustomerInput) Validate

func (a ListCustomerInput) Validate() error

type MarketplaceListingNotFoundError

type MarketplaceListingNotFoundError struct {
	appentity.MarketplaceListingID
}

func (MarketplaceListingNotFoundError) Error

type Service

type Service interface {
	AppService
}

type ValidationError

type ValidationError genericError

func (ValidationError) Error

func (e ValidationError) Error() string

func (ValidationError) Unwrap

func (e ValidationError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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