Documentation
¶
Index ¶
- Constants
- Variables
- type ByName
- type Dto
- type FlagValue
- type GetByModelParams
- type IModelSetting
- type IRootSettings
- type ISettingService
- type IStoreSettings
- type IUserSettings
- type MailerSettingChangedEvent
- type NotificationSenderChangedEvent
- type RemoveDTO
- type RootSettingChangedEvent
- type Service
- func (s *Service) GetAvailableModelSettings(ctx context.Context, model IModelSetting) ([]Dto, error)
- func (s *Service) GetAvailableStoreModelSettings(ctx context.Context, model IModelSetting) ([]Dto, error)
- func (s *Service) GetMailerSettings(ctx context.Context) (*settings.MailerSettings, error)
- func (s *Service) GetModelSetting(ctx context.Context, name string, model IModelSetting) (*models.Setting, error)
- func (s *Service) GetRootSetting(ctx context.Context, name string) (*models.Setting, error)
- func (s *Service) GetRootSettings(ctx context.Context) ([]*models.Setting, error)
- func (s *Service) GetRootSettingsByNames(ctx context.Context, names []string) ([]*models.Setting, error)
- func (s *Service) GetRootSettingsList(ctx context.Context) ([]Dto, error)
- func (s *Service) GetStoreModelSetting(ctx context.Context, name string, model IModelSetting) (*models.Setting, error)
- func (s *Service) Is2faRequired(name string) bool
- func (s *Service) RemoveRootSetting(ctx context.Context, name string) error
- func (s *Service) RemoveSetting(ctx context.Context, user *models.User, name string) error
- func (s *Service) RemoveStoreModelSetting(ctx context.Context, store *models.Store, name string) error
- func (s *Service) SetModelSetting(ctx context.Context, dto UpdateDTO, opts ...repos.Option) error
- func (s *Service) SetRootSetting(ctx context.Context, name, value string) (*models.Setting, error)
- func (s *Service) SetStoreModelSetting(ctx context.Context, dto UpdateDTO, opts ...repos.Option) error
- type TransferTypeValue
- type UpdateDTO
- type UpdateDto
Constants ¶
View Source
const ( DvAdminSecretKey = "dv_admin_secret_key" ProcessingURL = "processing_url" ProcessingClientID = "processing_client_id" ProcessingClientKey = "processing_client_key" RegistrationState = "registration_state" MailerState = "mailer_state" MailerProtocol = "mailer_protocol" MailerAddress = "mailer_address" MailerSender = "mailer_sender" MailerUsername = "mailer_username" MailerPassword = "mailer_password" MailerEncryption = "mailer_encryption" MerchantDomain = "merchant_domain" MerchantPayFormDomain = "merchant_pay_form_domain" NotificationSender = "notification_sender" AnonymousTelemetry = "anonymous_telemetry" )
Root settings
View Source
const ( ExternalWalletsListNotification = "external_wallet_email_notification" UserCryptoReceiptNotification = "user_crypto_receipt_email_notification" )
View Source
const ( FlagValueEnabled = "enabled" FlagValueDisabled = "disabled" )
View Source
const ( MailerEncryptionTypeNone = "none" MailerEncryptionTypeTLS = "tls" )
View Source
const ( NotificationSenderInternal = "internal" NotificationSenderDVNet = "dv_net" )
View Source
const ( FlagValueCompleted = "completed" FlagValueIncompleted = "incompleted" )
View Source
const (
MailerSettingsChanged = "MailerSettingChanged"
)
View Source
const (
NotificationSenderChanged = "NotificationSenderChanged"
)
View Source
const (
QuickStartGuideStatus = "quick_start_guide_status"
)
View Source
const (
RootSettingsChanged = "SettingChanged"
)
View Source
const (
TransferStatusSystemSuspended string = "system_suspended"
)
View Source
const (
TransferType = "transfer_type"
)
TransferType Tron settings
View Source
const (
TransfersStatus = "transfers_status"
)
TransfersStatus Common settings
View Source
const (
WithdrawFromProcessing = "withdraw_from_processing"
)
Variables ¶
View Source
var ExposedSettings = []string{ ProcessingURL, RegistrationState, MailerState, MailerProtocol, MailerAddress, MailerSender, MailerUsername, MailerPassword, MailerEncryption, MerchantDomain, MerchantPayFormDomain, AnonymousTelemetry, }
View Source
var MailerSettings = []string{ MailerState, MailerProtocol, MailerAddress, MailerSender, MailerUsername, MailerPassword, MailerEncryption, }
View Source
var SensitiveSettings = []string{ DvAdminSecretKey, }
Functions ¶
This section is empty.
Types ¶
type GetByModelParams ¶
type GetByModelParams = repo_settings.GetByModelParams
type IModelSetting ¶
type IRootSettings ¶
type IRootSettings interface {
GetRootSetting(ctx context.Context, name string) (*models.Setting, error)
SetRootSetting(ctx context.Context, name string, value string) (*models.Setting, error)
GetRootSettings(ctx context.Context) ([]*models.Setting, error)
GetRootSettingsByNames(ctx context.Context, names []string) ([]*models.Setting, error)
GetRootSettingsList(ctx context.Context) ([]Dto, error)
RemoveRootSetting(ctx context.Context, name string) error
GetMailerSettings(ctx context.Context) (*settings.MailerSettings, error)
}
type ISettingService ¶
type ISettingService interface {
IUserSettings
IRootSettings
IStoreSettings
Is2faRequired(name string) bool
}
type IStoreSettings ¶ added in v0.9.6
type IStoreSettings interface {
GetStoreModelSetting(ctx context.Context, name string, model IModelSetting) (*models.Setting, error)
SetStoreModelSetting(ctx context.Context, dto UpdateDTO, opts ...repos.Option) error
GetAvailableStoreModelSettings(ctx context.Context, model IModelSetting) ([]Dto, error)
RemoveStoreModelSetting(ctx context.Context, store *models.Store, name string) error
}
type IUserSettings ¶
type IUserSettings interface {
GetModelSetting(ctx context.Context, name string, model IModelSetting) (*models.Setting, error)
SetModelSetting(ctx context.Context, dto UpdateDTO, option ...repos.Option) error
GetAvailableModelSettings(ctx context.Context, model IModelSetting) ([]Dto, error)
RemoveSetting(ctx context.Context, user *models.User, name string) error
}
type MailerSettingChangedEvent ¶
func (MailerSettingChangedEvent) String ¶
func (e MailerSettingChangedEvent) String() string
func (MailerSettingChangedEvent) Type ¶
func (e MailerSettingChangedEvent) Type() event.Type
type NotificationSenderChangedEvent ¶
type NotificationSenderChangedEvent struct {
NewValue string
}
func (NotificationSenderChangedEvent) String ¶
func (e NotificationSenderChangedEvent) String() string
func (NotificationSenderChangedEvent) Type ¶
func (e NotificationSenderChangedEvent) Type() event.Type
type RootSettingChangedEvent ¶
func (RootSettingChangedEvent) String ¶
func (e RootSettingChangedEvent) String() string
func (RootSettingChangedEvent) Type ¶
func (e RootSettingChangedEvent) Type() event.Type
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) GetAvailableModelSettings ¶
func (*Service) GetAvailableStoreModelSettings ¶ added in v0.9.6
func (*Service) GetMailerSettings ¶
func (*Service) GetModelSetting ¶
func (*Service) GetRootSetting ¶
func (*Service) GetRootSettings ¶
func (*Service) GetRootSettingsByNames ¶
func (*Service) GetRootSettingsList ¶
func (*Service) GetStoreModelSetting ¶ added in v0.9.6
func (*Service) Is2faRequired ¶
func (*Service) RemoveRootSetting ¶
func (*Service) RemoveSetting ¶
func (*Service) RemoveStoreModelSetting ¶ added in v0.9.6
func (*Service) SetModelSetting ¶
func (*Service) SetRootSetting ¶
type TransferTypeValue ¶
type TransferTypeValue string
const ( TransferByBurnTRX TransferTypeValue = "burntrx" TransferByResource TransferTypeValue = "resources" TransferByCloudDelegate TransferTypeValue = "cloud_delegate" )
func (TransferTypeValue) String ¶
func (o TransferTypeValue) String() string
type UpdateDTO ¶
type UpdateDTO struct {
Name string
Value string
Model IModelSetting
}
Click to show internal directories.
Click to hide internal directories.