app

package
v0.0.0-...-a9c8cbe Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModelName -
	ModelName string = "app"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Env       env.Env
	Logger    zerolog.Logger
	RepoStore *repostore.RepoStore
}

Model -

func NewModel

func NewModel(e env.Env, l zerolog.Logger, rs *repostore.RepoStore) (m *Model, err error)

NewModel -

func (*Model) CreateAppInstanceRec

func (m *Model) CreateAppInstanceRec(appID string) (rec *record.AppInstanceRecord, err error)

CreateAppInstanceRec -

func (*Model) CreateAppRec

func (m *Model) CreateAppRec(rec *record.AppRecord) (err error)

CreateAppRec -

func (*Model) DeleteAppRec

func (m *Model) DeleteAppRec(appID string) (err error)

DeleteAppRec -

func (*Model) GetAppInstanceRec

func (m *Model) GetAppInstanceRec(appID string) (rec *record.AppInstanceRecord, err error)

GetAppInstanceRec -

func (*Model) GetAppRec

func (m *Model) GetAppRec(appID string) (rec *record.AppRecord, err error)

GetAppRec -

func (*Model) GetAppRecs

func (m *Model) GetAppRecs(params map[string]interface{}) (recs []*record.AppRecord, err error)

GetAppRecs -

func (*Model) GetDeathFormulaParams

func (m *Model) GetDeathFormulaParams(rec *record.AppRecord) (params []string, err error)

GetDeathFormulaParams - returns array of parameter names from the formula that are required to calculate initiative

func (*Model) GetDeathValue

func (m *Model) GetDeathValue(rec *record.AppRecord, params map[string]int) (value bool, err error)

GetDeathValue -

func (*Model) GetInitiativeFormulaParams

func (m *Model) GetInitiativeFormulaParams(rec *record.AppRecord) (params []string, err error)

GetInitiativeFormulaParams - returns array of parameter names from the formula that are required to calculate initiative

func (*Model) GetInitiativeValue

func (m *Model) GetInitiativeValue(rec *record.AppRecord, params map[string]int) (value int, err error)

GetInitiativeValue -

func (*Model) GetInstanceData

func (m *Model) GetInstanceData(rec *record.AppInstanceRecord) (data *record.AppInstanceData, err error)

GetInstanceData - unmarshal state data from the app instance record

func (*Model) RemoveAppInstanceRec

func (m *Model) RemoveAppInstanceRec(appInstanceID string) (err error)

RemoveAppInstanceRec -

func (*Model) SetAppInstanceData

func (m *Model) SetAppInstanceData(rec *record.AppInstanceRecord, data *record.AppInstanceData) (err error)

SetAppInstanceData - marshal new state data assigning to the app instance record

func (*Model) UpdateAppInstanceRec

func (m *Model) UpdateAppInstanceRec(rec *record.AppInstanceRecord) (err error)

UpdateAppInstanceRec -

func (*Model) UpdateAppRec

func (m *Model) UpdateAppRec(rec *record.AppRecord) (err error)

UpdateAppRec -

Jump to

Keyboard shortcuts

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