pluginsettings

package
v0.0.1-test Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DTO

type DTO struct {
	ID             int64
	OrgID          int64
	PluginID       string
	PluginVersion  string
	JSONData       map[string]interface{}
	SecureJSONData map[string][]byte
	Enabled        bool
	Pinned         bool
	Updated        time.Time
}

type FakePluginSettings

type FakePluginSettings struct {
	Service

	Plugins map[string]*DTO
}

func (*FakePluginSettings) DecryptedValues

func (ps *FakePluginSettings) DecryptedValues(dto *DTO) map[string]string

DecryptedValues decrypts the encrypted secureJSONData of the provided plugin setting and returns the decrypted values.

func (*FakePluginSettings) GetPluginSettingByPluginID

func (ps *FakePluginSettings) GetPluginSettingByPluginID(ctx context.Context, args *GetByPluginIDArgs) (*DTO, error)

GetPluginSettingByPluginID returns a Plugin Settings by Plugin ID

func (*FakePluginSettings) GetPluginSettings

func (ps *FakePluginSettings) GetPluginSettings(_ context.Context, _ *GetArgs) ([]*InfoDTO, error)

GetPluginSettings returns all Plugin Settings for the provided Org

func (*FakePluginSettings) UpdatePluginSetting

func (ps *FakePluginSettings) UpdatePluginSetting(ctx context.Context, args *UpdateArgs) error

UpdatePluginSetting updates a Plugin Setting

func (*FakePluginSettings) UpdatePluginSettingPluginVersion

func (ps *FakePluginSettings) UpdatePluginSettingPluginVersion(ctx context.Context, args *UpdatePluginVersionArgs) error

UpdatePluginSettingPluginVersion updates a Plugin Setting's plugin version

type GetArgs

type GetArgs struct {
	OrgID int64
}

type GetByPluginIDArgs

type GetByPluginIDArgs struct {
	PluginID string
	OrgID    int64
}

type InfoDTO

type InfoDTO struct {
	PluginID      string
	OrgID         int64
	Enabled       bool
	Pinned        bool
	PluginVersion string
}

type Service

type Service interface {
	// GetPluginSettings returns all Plugin Settings for the provided Org
	GetPluginSettings(ctx context.Context, args *GetArgs) ([]*InfoDTO, error)
	// GetPluginSettingByPluginID returns a Plugin Settings by Plugin ID
	GetPluginSettingByPluginID(ctx context.Context, args *GetByPluginIDArgs) (*DTO, error)
	// UpdatePluginSetting updates a Plugin Setting
	UpdatePluginSetting(ctx context.Context, args *UpdateArgs) error
	// UpdatePluginSettingPluginVersion updates a Plugin Setting's plugin version
	UpdatePluginSettingPluginVersion(ctx context.Context, args *UpdatePluginVersionArgs) error
	// DecryptedValues decrypts the encrypted secureJSONData of the provided plugin setting and
	// returns the decrypted values.
	DecryptedValues(ps *DTO) map[string]string
}

type UpdateArgs

type UpdateArgs struct {
	Enabled                 bool
	Pinned                  bool
	JSONData                map[string]interface{}
	SecureJSONData          map[string]string
	PluginVersion           string
	PluginID                string
	OrgID                   int64
	EncryptedSecureJSONData map[string][]byte
}

type UpdatePluginVersionArgs

type UpdatePluginVersionArgs struct {
	PluginVersion string
	PluginID      string
	OrgID         int64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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