Documentation
¶
Index ¶
- type Account
- type ActivityRecord
- type ActivityRecordAffectedResource
- type InstalledService
- func (InstalledService) InitialEntries() (entries []interface{}, err error)
- func (InstalledService) JoinCmdSteps(cmdSteps []valueObject.UnixCommand) string
- func (InstalledService) JoinEnvs(envs []valueObject.ServiceEnv) string
- func (InstalledService) JoinPortBindings(portBindings []valueObject.PortBinding) string
- func (InstalledService) SplitCmdSteps(cmdStepsStr string) []valueObject.UnixCommand
- func (InstalledService) SplitEnvs(envsStr string) []valueObject.ServiceEnv
- func (InstalledService) SplitPortBindings(portBindingsStr string) []valueObject.PortBinding
- func (InstalledService) TableName() string
- func (model InstalledService) ToEntity() (serviceEntity entity.InstalledService, err error)
- type Mapping
- type MappingSecurityRule
- func (MappingSecurityRule) InitialEntries() (initialEntries []interface{}, err error)
- func (MappingSecurityRule) TableName() string
- func (model MappingSecurityRule) ToEntity() (ruleEntity entity.MappingSecurityRule, err error)
- func (MappingSecurityRule) ToModel(ruleEntity entity.MappingSecurityRule) MappingSecurityRule
- type MarketplaceInstalledItem
- type ScheduledTask
- type ScheduledTaskTag
- type SecureAccessPublicKey
- type VirtualHost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v0.1.2
type Account struct {
ID uint64 `gorm:"primaryKey"`
GroupId uint64 `gorm:"not null"`
Username string `gorm:"not null"`
KeyHash *string
HomeDirectory string `gorm:"not null"`
IsSuperAdmin bool `gorm:"not null"`
SecureAccessPublicKeys []SecureAccessPublicKey
CreatedAt time.Time
UpdatedAt time.Time
}
type ActivityRecord ¶
type ActivityRecord struct {
ID uint64 `gorm:"primaryKey"`
RecordLevel string `gorm:"not null"`
RecordCode string `gorm:"not null"`
AffectedResources []ActivityRecordAffectedResource
RecordDetails *string
OperatorAccountId *uint64
OperatorIpAddress *string
CreatedAt time.Time `gorm:"not null"`
}
func NewActivityRecord ¶
func NewActivityRecord( recordId uint64, recordLevel, recordCode string, affectedResources []ActivityRecordAffectedResource, recordDetails *string, operatorAccountId *uint64, operatorIpAddress *string, ) ActivityRecord
func (ActivityRecord) TableName ¶
func (ActivityRecord) TableName() string
func (ActivityRecord) ToEntity ¶
func (model ActivityRecord) ToEntity() (recordEntity entity.ActivityRecord, err error)
type ActivityRecordAffectedResource ¶ added in v0.1.2
type ActivityRecordAffectedResource struct {
ID uint64 `gorm:"primaryKey"`
SystemResourceIdentifier string `gorm:"not null"`
ActivityRecordID uint64 `gorm:"not null"`
}
func (ActivityRecordAffectedResource) TableName ¶ added in v0.1.2
func (ActivityRecordAffectedResource) TableName() string
type InstalledService ¶
type InstalledService struct {
Name string `gorm:"primarykey;not null"`
Nature string `gorm:"not null"`
Type string `gorm:"not null"`
Version string `gorm:"not null"`
StartCmd string `gorm:"not null"`
Envs *string
PortBindings *string
StopTimeoutSecs int64
StopCmdSteps *string
PreStartTimeoutSecs int64
PreStartCmdSteps *string
PostStartTimeoutSecs int64
PostStartCmdSteps *string
PreStopTimeoutSecs int64
PreStopCmdSteps *string
PostStopTimeoutSecs int64
PostStopCmdSteps *string
ExecUser *string
WorkingDirectory *string
StartupFile *string
AutoStart *bool
AutoRestart *bool
TimeoutStartSecs *uint
MaxStartRetries *uint
LogOutputPath *string
LogErrorPath *string
AvatarUrl *string
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
func NewInstalledService ¶
func NewInstalledService( name, nature, serviceType, version, startCmd string, envs []valueObject.ServiceEnv, portBindings []valueObject.PortBinding, stopSteps, preStartSteps, postStartSteps, preStopSteps, postStopSteps []valueObject.UnixCommand, execUser, workingDirectory, startupFile *string, autoStart, autoRestart *bool, timeoutStartSecs, maxStartRetries *uint, logOutputPath, logErrorPath *string, avatarUrl *string, ) InstalledService
func (InstalledService) InitialEntries ¶
func (InstalledService) InitialEntries() (entries []interface{}, err error)
func (InstalledService) JoinCmdSteps ¶
func (InstalledService) JoinCmdSteps(cmdSteps []valueObject.UnixCommand) string
func (InstalledService) JoinEnvs ¶
func (InstalledService) JoinEnvs(envs []valueObject.ServiceEnv) string
func (InstalledService) JoinPortBindings ¶
func (InstalledService) JoinPortBindings(portBindings []valueObject.PortBinding) string
func (InstalledService) SplitCmdSteps ¶
func (InstalledService) SplitCmdSteps(cmdStepsStr string) []valueObject.UnixCommand
func (InstalledService) SplitEnvs ¶
func (InstalledService) SplitEnvs(envsStr string) []valueObject.ServiceEnv
func (InstalledService) SplitPortBindings ¶
func (InstalledService) SplitPortBindings(portBindingsStr string) []valueObject.PortBinding
func (InstalledService) TableName ¶
func (InstalledService) TableName() string
func (InstalledService) ToEntity ¶
func (model InstalledService) ToEntity() (serviceEntity entity.InstalledService, err error)
type Mapping ¶
type Mapping struct {
ID uint64 `gorm:"primaryKey"`
Hostname string `gorm:"not null"`
Path string `gorm:"not null"`
MatchPattern string `gorm:"not null"`
TargetType string `gorm:"not null"`
TargetValue *string
TargetHttpResponseCode *string
ShouldUpgradeInsecureRequests *bool
MarketplaceInstalledItemID *uint
MarketplaceInstalledItemName *string
MappingSecurityRuleID *uint64
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
type MappingSecurityRule ¶ added in v0.2.4
type MappingSecurityRule struct {
ID uint64 `gorm:"primaryKey"`
Name string `gorm:"not null"`
Description *string
AllowedIps []string `gorm:"serializer:json"`
BlockedIps []string `gorm:"serializer:json"`
RpsSoftLimitPerIp *uint
RpsHardLimitPerIp *uint
ResponseCodeOnMaxRequests *uint
MaxConnectionsPerIp *uint
BandwidthBpsLimitPerConnection *uint64
BandwidthLimitOnlyAfterBytes *uint64
ResponseCodeOnMaxConnections *uint
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
func (MappingSecurityRule) InitialEntries ¶ added in v0.2.4
func (MappingSecurityRule) InitialEntries() (initialEntries []interface{}, err error)
func (MappingSecurityRule) TableName ¶ added in v0.2.4
func (MappingSecurityRule) TableName() string
func (MappingSecurityRule) ToEntity ¶ added in v0.2.4
func (model MappingSecurityRule) ToEntity() (ruleEntity entity.MappingSecurityRule, err error)
func (MappingSecurityRule) ToModel ¶ added in v0.2.4
func (MappingSecurityRule) ToModel(ruleEntity entity.MappingSecurityRule) MappingSecurityRule
type MarketplaceInstalledItem ¶
type MarketplaceInstalledItem struct {
ID uint16 `gorm:"primaryKey"`
Name string `gorm:"not null"`
Hostname string `gorm:"not null"`
Type string `gorm:"not null"`
UrlPath string `gorm:"not null"`
InstallDirectory string `gorm:"not null"`
InstallUuid string `gorm:"not null"`
Services string
Mappings []Mapping
AvatarUrl string `gorm:"not null"`
Slug string `gorm:"not null"`
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
func (MarketplaceInstalledItem) TableName ¶
func (MarketplaceInstalledItem) TableName() string
func (MarketplaceInstalledItem) ToEntity ¶
func (model MarketplaceInstalledItem) ToEntity() ( entity.MarketplaceInstalledItem, error, )
type ScheduledTask ¶
type ScheduledTask struct {
ID uint64 `gorm:"primaryKey"`
Name string `gorm:"not null"`
Status string `gorm:"not null,index"`
Command string `gorm:"not null"`
Tags []ScheduledTaskTag
TimeoutSecs *uint16
RunAt *time.Time
Output *string
Error *string
StartedAt *time.Time
FinishedAt *time.Time
ElapsedSecs *uint32
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
func NewScheduledTask ¶
func (ScheduledTask) TableName ¶
func (ScheduledTask) TableName() string
func (ScheduledTask) ToEntity ¶
func (model ScheduledTask) ToEntity() (taskEntity entity.ScheduledTask, err error)
type ScheduledTaskTag ¶
type ScheduledTaskTag struct {
ID uint64 `gorm:"primaryKey"`
Tag string `gorm:"not null"`
ScheduledTaskID uint64 `gorm:"not null"`
}
func (ScheduledTaskTag) TableName ¶
func (ScheduledTaskTag) TableName() string
type SecureAccessPublicKey ¶ added in v0.1.7
type SecureAccessPublicKey struct {
ID uint16 `gorm:"primaryKey"`
AccountID uint64 `gorm:"not null"`
Name string `gorm:"not null"`
Content string `gorm:"not null"`
CreatedAt time.Time
UpdatedAt time.Time
}
func NewSecureAccessPublicKey ¶ added in v0.1.7
func NewSecureAccessPublicKey( id uint16, accountId uint64, name, content string, ) SecureAccessPublicKey
func (SecureAccessPublicKey) TableName ¶ added in v0.1.7
func (SecureAccessPublicKey) TableName() string
func (SecureAccessPublicKey) ToEntity ¶ added in v0.1.7
func (model SecureAccessPublicKey) ToEntity() ( secureAccessPublicKeyEntity entity.SecureAccessPublicKey, err error, )
type VirtualHost ¶
type VirtualHost struct {
Hostname string `gorm:"primaryKey"`
Type string `gorm:"not null"`
RootDirectory string `gorm:"not null"`
ParentHostname *string `gorm:"index"`
IsPrimary bool `gorm:"not null;default:false"`
IsWildcard bool `gorm:"not null;default:false"`
Aliases []VirtualHost `gorm:"foreignKey:ParentHostname"`
CreatedAt time.Time `gorm:"not null"`
UpdatedAt time.Time `gorm:"not null"`
}
func (VirtualHost) InitialEntries ¶
func (model VirtualHost) InitialEntries() (entries []interface{}, err error)
func (VirtualHost) ToEntity ¶
func (model VirtualHost) ToEntity() (vhost entity.VirtualHost, err error)
Click to show internal directories.
Click to hide internal directories.