appentity

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	GetAppBase() appentitybase.AppBase
	GetID() appentitybase.AppID
	GetType() appentitybase.AppType
	GetName() string
	GetDescription() *string
	GetStatus() appentitybase.AppStatus
	GetMetadata() map[string]string
	GetListing() appentitybase.MarketplaceListing

	// ValidateCapabilities validates if the app can run for the given capabilities
	ValidateCapabilities(capabilities ...appentitybase.CapabilityType) error

	// Customer data
	GetCustomerData(ctx context.Context, input GetAppInstanceCustomerDataInput) (CustomerData, error)
	UpsertCustomerData(ctx context.Context, input UpsertAppInstanceCustomerDataInput) error
	DeleteCustomerData(ctx context.Context, input DeleteAppInstanceCustomerDataInput) error
}

App represents an installed app

type AppFactory

type AppFactory interface {
	NewApp(context.Context, appentitybase.AppBase) (App, error)
	InstallAppWithAPIKey(ctx context.Context, input AppFactoryInstallAppWithAPIKeyInput) (App, error)
	UninstallApp(ctx context.Context, input UninstallAppInput) error
}

type AppFactoryInstallAppWithAPIKeyInput

type AppFactoryInstallAppWithAPIKeyInput struct {
	Namespace string
	APIKey    string
	BaseURL   string
	Name      string
}

func (AppFactoryInstallAppWithAPIKeyInput) Validate

type AuthorizeOauth2InstallInput

type AuthorizeOauth2InstallInput struct {
	MarketplaceListingID

	Code string
	// Success response fields
	State string
	// Error response fields
	Error            string
	ErrorDescription string
	ErrorURI         string
}

func (AuthorizeOauth2InstallInput) Validate

func (i AuthorizeOauth2InstallInput) Validate() error

type CreateAppInput

type CreateAppInput struct {
	Namespace   string
	Name        string
	Description string
	Type        appentitybase.AppType
}

CreateAppInput is the input for creating an app

func (CreateAppInput) Validate

func (i CreateAppInput) Validate() error

type CustomerApp

type CustomerApp struct {
	App          App
	CustomerData CustomerData
}

type CustomerData

type CustomerData interface {
	Validate() error
}

type DeleteAppInstanceCustomerDataInput

type DeleteAppInstanceCustomerDataInput struct {
	CustomerID customerentity.CustomerID
}

func (DeleteAppInstanceCustomerDataInput) Validate

type GetAppInput

type GetAppInput = appentitybase.AppID

GetAppInput is the input for getting an installed app

type GetAppInstanceCustomerDataInput

type GetAppInstanceCustomerDataInput struct {
	CustomerID customerentity.CustomerID
}

func (GetAppInstanceCustomerDataInput) Validate

type GetDefaultAppInput

type GetDefaultAppInput struct {
	Namespace string
	Type      appentitybase.AppType
}

func (GetDefaultAppInput) Validate

func (i GetDefaultAppInput) Validate() error

type GetOauth2InstallURLInput

type GetOauth2InstallURLInput = MarketplaceListingID

type GetOauth2InstallURLOutput

type GetOauth2InstallURLOutput struct {
	URL string
}

type InstallAppWithAPIKeyInput

type InstallAppWithAPIKeyInput struct {
	MarketplaceListingID

	Namespace string
	APIKey    string
	Name      string
}

func (InstallAppWithAPIKeyInput) Validate

func (i InstallAppWithAPIKeyInput) Validate() error

type ListAppInput

type ListAppInput struct {
	Namespace string
	pagination.Page

	Type           *appentitybase.AppType
	IncludeDeleted bool
	// Only list apps that has data for the given customer
	CustomerID *customerentity.CustomerID
}

ListAppInput is the input for listing installed apps

func (ListAppInput) Validate

func (i ListAppInput) Validate() error

type MarketplaceGetInput

type MarketplaceGetInput = MarketplaceListingID

type MarketplaceListInput

type MarketplaceListInput struct {
	pagination.Page
}

func (MarketplaceListInput) Validate

func (i MarketplaceListInput) Validate() error

type MarketplaceListingID

type MarketplaceListingID struct {
	Type appentitybase.AppType
}

func (MarketplaceListingID) Validate

func (i MarketplaceListingID) Validate() error

type RegisterMarketplaceListingInput

type RegisterMarketplaceListingInput = RegistryItem

type RegistryItem

type RegistryItem struct {
	Listing appentitybase.MarketplaceListing
	Factory AppFactory
}

func (RegistryItem) Validate

func (r RegistryItem) Validate() error

type UninstallAppInput

type UninstallAppInput = appentitybase.AppID

type UpsertAppInstanceCustomerDataInput

type UpsertAppInstanceCustomerDataInput struct {
	CustomerID customerentity.CustomerID
	Data       CustomerData
}

func (UpsertAppInstanceCustomerDataInput) Validate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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