common

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilterBase64

func GetFilterBase64(ctx context.Context) string

func GetValues

func GetValues(filterBase64 string) (map[string]interface{}, error)

func SetAccountData

func SetAccountData(ctx context.Context, ac *AccountData)

func ToBase64

func ToBase64(values interface{}) (string, error)

Types

type AccountData

type AccountData struct {
	ShowPerm bool
	EditPerm bool

	Attachments     []*addonmysqlpb.Attachment
	AttachmentMap   map[uint64]*addonmysqlpb.Attachment
	Accounts        []*addonmysqlpb.MySQLAccount
	AccountMap      map[string]*addonmysqlpb.MySQLAccount
	AccountRefCount map[string]int
	Apps            []apistructs.ApplicationDTO
	AppMap          map[string]*apistructs.ApplicationDTO
}

func InitAccountData

func InitAccountData(ctx context.Context, instanceID string, projectID uint64) (*AccountData, error)

func LoadAccountData

func LoadAccountData(ctx context.Context) (*AccountData, error)

func (*AccountData) GetAccountName

func (d *AccountData) GetAccountName(accountID string) string

func (*AccountData) GetApp

func (d *AccountData) GetApp(appID string) *apistructs.ApplicationDTO

func (*AccountData) GetAppName

func (d *AccountData) GetAppName(appID string) string

type FilterValues

type FilterValues map[string]interface{}

func (FilterValues) StringSlice

func (v FilterValues) StringSlice(key string) []string

type PageDataAccount

type PageDataAccount struct {
	ProjectID  uint64
	InstanceID string

	AccountID string // for delete & viewPassword

	ShowDeleteModal       bool
	ShowViewPasswordModal bool

	FilterValues FilterValues
}

func InitPageDataAccount

func InitPageDataAccount(ctx context.Context) (*PageDataAccount, error)

func LoadPageDataAccount

func LoadPageDataAccount(ctx context.Context) *PageDataAccount

type PageDataAttachment

type PageDataAttachment struct {
	ProjectID  uint64
	InstanceID string

	AttachmentID string // for config & edit

	ShowConfigPanel   bool
	ShowEditFormModal bool

	FilterValues FilterValues
}

func InitPageDataAttachment

func InitPageDataAttachment(ctx context.Context) (*PageDataAttachment, error)

func LoadPageDataAttachment

func LoadPageDataAttachment(ctx context.Context) *PageDataAttachment

Jump to

Keyboard shortcuts

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