module_store

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

func UnMarshalStore

func UnMarshalStore(ctx context.Context, b []byte, msi ModuleStoreI) error

Types

type ModuleDbStore

type ModuleDbStore struct {
	store.DbStore
	ModuleStore
}

type ModuleFileStore

type ModuleFileStore struct {
	store.FileStore
	ModuleStore
}

type ModuleStore

type ModuleStore struct {
	Projects map[string]*module_model.Project `json:"projects"` //ProjectId is the key
}

func (*ModuleStore) GetChannel

func (ms *ModuleStore) GetChannel(ctx context.Context, channelName string, projectId string, realStore ModuleStoreI) (channel.ChannelI, error)

func (*ModuleStore) GetMessageTemplate

func (ms *ModuleStore) GetMessageTemplate(ctx context.Context, projectId string, templateName string, realStore ModuleStoreI) (channel.MessageTemplate, error)

func (*ModuleStore) GetProjectConfig

func (ms *ModuleStore) GetProjectConfig(ctx context.Context, projectId string) (*module_model.Project, error)

func (*ModuleStore) GetProjectList

func (ms *ModuleStore) GetProjectList(ctx context.Context) []map[string]interface{}

func (*ModuleStore) RemoveChannel

func (ms *ModuleStore) RemoveChannel(ctx context.Context, channelName string, projectId string, realStore ModuleStoreI) error

func (*ModuleStore) RemoveMessageTemplate

func (ms *ModuleStore) RemoveMessageTemplate(ctx context.Context, projectId string, templateName string, realStore ModuleStoreI) error

func (*ModuleStore) RemoveProject

func (ms *ModuleStore) RemoveProject(ctx context.Context, projectId string, realStore ModuleStoreI) error

func (*ModuleStore) SaveChannel

func (ms *ModuleStore) SaveChannel(ctx context.Context, channelObj channel.ChannelI, projectId string, realStore ModuleStoreI, persist bool) error

func (*ModuleStore) SaveMessageTemplate

func (ms *ModuleStore) SaveMessageTemplate(ctx context.Context, projectId string, messageTemplate channel.MessageTemplate, realStore ModuleStoreI) error

func (*ModuleStore) SaveProject

func (ms *ModuleStore) SaveProject(ctx context.Context, projectId string, realStore ModuleStoreI, persist bool) error

type ModuleStoreI

type ModuleStoreI interface {
	store.StoreI
	SaveProject(ctx context.Context, projectId string, realStore ModuleStoreI, persist bool) error
	RemoveProject(ctx context.Context, projectId string, realStore ModuleStoreI) error
	GetProjectConfig(ctx context.Context, projectId string) (*module_model.Project, error)
	GetProjectList(ctx context.Context) []map[string]interface{}
	SaveMessageTemplate(ctx context.Context, projectId string, messageTemplate channel.MessageTemplate, realStore ModuleStoreI) error
	RemoveMessageTemplate(ctx context.Context, projectId string, templateName string, realStore ModuleStoreI) error
	GetMessageTemplate(ctx context.Context, projectId string, templateId string, realStore ModuleStoreI) (channel.MessageTemplate, error)
	SaveChannel(ctx context.Context, channelObj channel.ChannelI, projectId string, realStore ModuleStoreI, persist bool) error
	RemoveChannel(ctx context.Context, channelName string, projectId string, realStore ModuleStoreI) error
	GetChannel(ctx context.Context, channelName string, projectId string, realStore ModuleStoreI) (channel.ChannelI, error)
}

type StoreHolder

type StoreHolder struct {
	Store ModuleStoreI
}

Jump to

Keyboard shortcuts

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