postgres

package
v0.0.0-...-d65c52b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDetail

type AppDetail struct {
	DetailId    int64  `xorm:"'application_detail_id' pk autoincr"`
	AppId       int64  `xorm:"'application_id'"`
	EnvName     string `xorm:"'env_name'"`
	DcName      string `xorm:"'datacenter_name'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*AppDetail) TableName

func (u *AppDetail) TableName() string

type Application

type Application struct {
	AppId         int64  `xorm:"'application_id' pk autoincr"`
	AppName       string `xorm:"'application_name'"`
	AppDesc       string `xorm:"'application_description'"`
	AppOwnerOrgId string `xorm:"'application_owner_org'"`
	TimeCreated   int64  `xorm:"'time_created'"`
	TimeUpdated   int64  `xorm:"'time_updated'"`
}

func (*Application) TableName

func (u *Application) TableName() string

type Configuration

type Configuration struct {
	ConfigId          int64  `xorm:"'cfg_id' pk autoincr"`
	Selectors         string `xorm:"'selectors'"`
	OptionalSelectors string `xorm:"'optional_selectors' default ''"`
	ConfigGroup       string `xorm:"'cfg_group'"`
	ConfigKey         string `xorm:"'cfg_key'"`
	ConfigVersion     string `xorm:"'cfg_version'"`
	RawConfigValue    []byte `xorm:"'raw_cfg_value'"`
	ConfigStatus      int64  `xorm:"'cfg_status'"`
	TimeCreated       int64  `xorm:"'time_created'"`
	TimeUpdated       int64  `xorm:"'time_updated'"`
	Sequence          int64  `xorm:"'sequence'"`
}

func (*Configuration) TableName

func (c *Configuration) TableName() string

type Configure

type Configure struct {
	ConfigId        int64  `xorm:"'config_id' pk autoincr"`
	ConfigKey       string `xorm:"'config_key'"`
	ConfigNamespace string `xorm:"'config_namespace'"`
	ConfigEnv       string `xorm:"'config_env'"`
	ConfigDc        string `xorm:"'config_datacenter'"`
	ContentType     string `xorm:"'config_content_type'"`
	Content         string `xorm:"'config_content'"`
	ConfigVersion   string `xorm:"'config_version' default ''"`
	ConfigStatus    int64  `xorm:"'config_status'"`
	TimeCreated     int64  `xorm:"'time_created'"`
	TimeUpdated     int64  `xorm:"'time_updated'"`
}

func (*Configure) TableName

func (u *Configure) TableName() string

type ConfigureStoreImpl

type ConfigureStoreImpl struct {
}

func (*ConfigureStoreImpl) AddApplicationNamespace

func (c *ConfigureStoreImpl) AddApplicationNamespace(ctx context.Context, app *domains.Application, ns *domains.Namespace) error

func (*ConfigureStoreImpl) AddConfiguration

func (c *ConfigureStoreImpl) AddConfiguration(ctx context.Context, cfg *domains.Configure) error

func (*ConfigureStoreImpl) AddDc

func (*ConfigureStoreImpl) AddEnv

func (*ConfigureStoreImpl) ExistsAppEnvDcMapping

func (c *ConfigureStoreImpl) ExistsAppEnvDcMapping(ctx context.Context, env *domains.Environment, dc *domains.Datacenter, app *domains.Application) (bool, error)

func (*ConfigureStoreImpl) ExistsApplicationNamespace

func (c *ConfigureStoreImpl) ExistsApplicationNamespace(ctx context.Context, app *domains.Application, nsName string) (bool, error)

func (*ConfigureStoreImpl) ExistsConfigure

func (*ConfigureStoreImpl) LinkEnvAndDcToApp

func (c *ConfigureStoreImpl) LinkEnvAndDcToApp(ctx context.Context, env *domains.Environment, dc *domains.Datacenter, app *domains.Application) error

func (*ConfigureStoreImpl) LoadAppConfigList

func (c *ConfigureStoreImpl) LoadAppConfigList(ctx context.Context, app *domains.Application, env *domains.Environment, dc *domains.Datacenter) (result []*domains.Configure, rerr error)

func (*ConfigureStoreImpl) LoadAppNamespaces

func (c *ConfigureStoreImpl) LoadAppNamespaces(ctx context.Context, app *domains.Application) (result []*domains.Namespace, rerr error)

func (*ConfigureStoreImpl) LoadApplicationById

func (c *ConfigureStoreImpl) LoadApplicationById(ctx context.Context, applicationId int64) (*domains.Application, error)

func (*ConfigureStoreImpl) LoadApplicationsByOrganizationId

func (c *ConfigureStoreImpl) LoadApplicationsByOrganizationId(ctx context.Context, orgId string) (result []*domains.Application, rerr error)

func (*ConfigureStoreImpl) LoadConfigureById

func (c *ConfigureStoreImpl) LoadConfigureById(ctx context.Context, cfgId int64) (*domains.Configure, error)

func (*ConfigureStoreImpl) LoadDatacenter

func (c *ConfigureStoreImpl) LoadDatacenter(ctx context.Context, dc string) (*domains.Datacenter, error)

func (*ConfigureStoreImpl) LoadDcList

func (c *ConfigureStoreImpl) LoadDcList(ctx context.Context) (result []*domains.Datacenter, rerr error)

func (*ConfigureStoreImpl) LoadEnvAndDcListByAppId

func (c *ConfigureStoreImpl) LoadEnvAndDcListByAppId(ctx context.Context, appId int64) (r []struct {
	EnvName string
	DcName  string
}, rerr error)

func (*ConfigureStoreImpl) LoadEnvList

func (c *ConfigureStoreImpl) LoadEnvList(ctx context.Context) (result []*domains.Environment, rerr error)

func (*ConfigureStoreImpl) LoadEnvironment

func (c *ConfigureStoreImpl) LoadEnvironment(ctx context.Context, env string) (*domains.Environment, error)

func (*ConfigureStoreImpl) LoadNamespace

func (c *ConfigureStoreImpl) LoadNamespace(ctx context.Context, nsName string) (*domains.Namespace, error)

func (*ConfigureStoreImpl) NextConfigVersionSeq

func (c *ConfigureStoreImpl) NextConfigVersionSeq(ctx context.Context) (int64, error)

func (*ConfigureStoreImpl) SaveApplication

func (c *ConfigureStoreImpl) SaveApplication(ctx context.Context, application *domains.Application) error

func (*ConfigureStoreImpl) UpdateConfiguration

func (c *ConfigureStoreImpl) UpdateConfiguration(ctx context.Context, cfg *domains.Configure) error

type Datacenter

type Datacenter struct {
	DcName      string `xorm:"'datacenter_name' pk"`
	DcDesc      string `xorm:"'datacenter_description'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*Datacenter) TableName

func (u *Datacenter) TableName() string

type Environment

type Environment struct {
	EnvName     string `xorm:"'env_name' pk"`
	EnvDesc     string `xorm:"'env_description'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*Environment) TableName

func (u *Environment) TableName() string

type Namespace

type Namespace struct {
	Name        string `xorm:"'namespace_name' pk"`
	Description string `xorm:"'namespace_description'"`
	Type        string `xorm:"'namespace_type'"`
	AppId       int64  `xorm:"'namespace_app'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*Namespace) TableName

func (u *Namespace) TableName() string

type Org

type Org struct {
	OrgId       string `xorm:"'org_id' pk"`
	OrgName     string `xorm:"'org_name'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*Org) TableName

func (u *Org) TableName() string

type PushChangeRepositoryImpl

type PushChangeRepositoryImpl struct{}

func (*PushChangeRepositoryImpl) ExistsConfiguration

func (p *PushChangeRepositoryImpl) ExistsConfiguration(ctx context.Context, cfg *domains.Configure, app *domains.Application) (bool, error)

func (*PushChangeRepositoryImpl) InsertNewConfigure

func (p *PushChangeRepositoryImpl) InsertNewConfigure(ctx context.Context, cfg *domains.Configure, app *domains.Application) (int64, error)

func (*PushChangeRepositoryImpl) UpdateConfigurationSequence

func (p *PushChangeRepositoryImpl) UpdateConfigurationSequence(ctx context.Context, cfg *domains.Configure, app *domains.Application, configId int64) (bool, error)

func (*PushChangeRepositoryImpl) UpdateConfigure

func (p *PushChangeRepositoryImpl) UpdateConfigure(ctx context.Context, cfg *domains.Configure, app *domains.Application) (bool, error)

type User

type User struct {
	UserId         string `xorm:"'user_id' pk"`
	Username       string `xorm:"'username' unique"`
	Password       string `xorm:"'password'"`
	DisplayName    string `xorm:"'display_name'"`
	Email          string `xorm:"'email'"`
	UserStatus     int    `xorm:"'user_status'"`
	ExternalType   string `xorm:"'external_type'"`
	ExternalUserId string `xorm:"'external_user_id'"`
	TimeCreated    int64  `xorm:"'time_created'"`
	TimeUpdated    int64  `xorm:"'time_updated'"`
}

func (*User) TableName

func (u *User) TableName() string

type UserOrgMapping

type UserOrgMapping struct {
	MappingId   string `xorm:"'user_org_mapping_id' pk autoincr"`
	OrgId       string `xorm:"'org_id'"`
	UserId      string `xorm:"'user_id'"`
	RoleType    int    `xorm:"'role_type'"`
	TimeCreated int64  `xorm:"'time_created'"`
	TimeUpdated int64  `xorm:"'time_updated'"`
}

func (*UserOrgMapping) TableName

func (u *UserOrgMapping) TableName() string

type UserStoreImpl

type UserStoreImpl struct {
}

func (*UserStoreImpl) ExistsOrganizationByName

func (u *UserStoreImpl) ExistsOrganizationByName(ctx context.Context, orgName string) (bool, error)
func (u *UserStoreImpl) ExistsUserOrgLink(ctx context.Context, user *domains.User, org *domains.Org) (bool, error)

func (*UserStoreImpl) LinkUserOrg

func (u *UserStoreImpl) LinkUserOrg(ctx context.Context, user *domains.User, org *domains.Org, role int) error

func (*UserStoreImpl) QueryOrganizationByName

func (u *UserStoreImpl) QueryOrganizationByName(ctx context.Context, orgName string) (*domains.Org, error)

func (*UserStoreImpl) QueryOrganizationByOrgId

func (u *UserStoreImpl) QueryOrganizationByOrgId(ctx context.Context, orgId string) (*domains.Org, error)

func (*UserStoreImpl) QueryOrganizationsByUserId

func (u *UserStoreImpl) QueryOrganizationsByUserId(ctx context.Context, userId string) (result []*domains.Org, rerr error)

func (*UserStoreImpl) QueryUserByUsername

func (u *UserStoreImpl) QueryUserByUsername(ctx context.Context, username string) (*domains.User, error)

func (*UserStoreImpl) SaveNewOrganization

func (u *UserStoreImpl) SaveNewOrganization(ctx context.Context, org *domains.Org, owner *domains.User) error

func (*UserStoreImpl) SaveNewUser

func (u *UserStoreImpl) SaveNewUser(ctx context.Context, user *domains.User) error

func (*UserStoreImpl) UpdateUser

func (u *UserStoreImpl) UpdateUser(ctx context.Context, user *domains.User) error

Jump to

Keyboard shortcuts

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