Documentation ¶
Index ¶
- Constants
- type Config
- func (c *Config) GetAWSS3AccessKeyID() string
- func (c *Config) GetAWSS3AccessKeySecret() string
- func (c *Config) GetAWSS3Endpoint() string
- func (c *Config) GetAWSS3Region() string
- func (c *Config) GetAWSS3SystemBucketName() string
- func (c *Config) GetAWSS3TeamBucketName() string
- func (c *Config) GetAWSS3Timeout() time.Duration
- func (c *Config) GetControlToken() string
- func (c *Config) GetDriveType() string
- func (c *Config) GetIPZoneDetectorToken() string
- func (c *Config) GetKozmoDriveAPIForSDK() string
- func (c *Config) GetKozmoGoogleSheetsClientID() string
- func (c *Config) GetKozmoGoogleSheetsClientSecret() string
- func (c *Config) GetKozmoGoogleSheetsRedirectURI() string
- func (c *Config) GetKozmoMarketplaceInternalRestAPI() string
- func (c *Config) GetKozmoPeripheralAPI() string
- func (c *Config) GetKozmoSupervisorInternalRestAPI() string
- func (c *Config) GetMINIOAccessKeyID() string
- func (c *Config) GetMINIOAccessKeySecret() string
- func (c *Config) GetMINIOEndpoint() string
- func (c *Config) GetMINIOSystemBucketName() string
- func (c *Config) GetMINIOTeamBucketName() string
- func (c *Config) GetMINIOTimeout() time.Duration
- func (c *Config) GetPostgresAddr() string
- func (c *Config) GetPostgresDatabase() string
- func (c *Config) GetPostgresPassword() string
- func (c *Config) GetPostgresPort() string
- func (c *Config) GetPostgresUser() string
- func (c *Config) GetRandomKey() string
- func (c *Config) GetRedisAddr() string
- func (c *Config) GetRedisDatabase() int
- func (c *Config) GetRedisPassword() string
- func (c *Config) GetRedisPort() string
- func (c *Config) GetRuntimeEnv() string
- func (c *Config) GetSecretKey() string
- func (c *Config) GetWebScoketServerConnectionAddress() string
- func (c *Config) GetWebScoketServerConnectionAddressCenterEurope() string
- func (c *Config) GetWebScoketServerConnectionAddressEastAsia() string
- func (c *Config) GetWebScoketServerConnectionAddressSouthAsia() string
- func (c *Config) GetWebScoketServerListenAddress() string
- func (c *Config) GetWebsocketProtocol() string
- func (c *Config) GetkozmoResourceManagerInternalRestAPI() string
- func (c *Config) GetkozmoResourceManagerRestAPI() string
- func (c *Config) IsAWSTypeDrive() bool
- func (c *Config) IsCloudBetaMode() bool
- func (c *Config) IsCloudMode() bool
- func (c *Config) IsCloudProductionMode() bool
- func (c *Config) IsCloudTestMode() bool
- func (c *Config) IsMINIODrive() bool
- func (c *Config) IsSelfHostMode() bool
Constants ¶
View Source
const DEPLOY_MODE_CLOUD = "cloud"
View Source
const DEPLOY_MODE_CLOUD_BETA = "cloud-beta"
View Source
const DEPLOY_MODE_CLOUD_PRODUCTION = "cloud-production"
View Source
const DEPLOY_MODE_CLOUD_TEST = "cloud-test"
View Source
const DEPLOY_MODE_SELF_HOST = "self-host"
View Source
const DRIVE_TYPE_AWS = "aws"
View Source
const DRIVE_TYPE_DO = "do"
View Source
const DRIVE_TYPE_MINIO = "minio"
View Source
const PROTOCOL_WEBSOCKET = "ws"
View Source
const PROTOCOL_WEBSOCKET_OVER_TLS = "wss"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // server config ServerHost string `env:"KOZMO_SERVER_HOST" envDefault:"0.0.0.0"` ServerPort string `env:"KOZMO_SERVER_PORT" envDefault:"8001"` InternalServerPort string `env:"KOZMO_SERVER_INTERNAL_PORT" envDefault:"9005"` ServerMode string `env:"KOZMO_SERVER_MODE" envDefault:"debug"` DeployMode string `env:"KOZMO_DEPLOY_MODE" envDefault:"self-host"` SecretKey string `env:"KOZMO_SECRET_KEY" envDefault:"8xEMrWkBARcDDYQ"` // websocket config WebsocketServerHost string `env:"KOZMO_WEBSOCKET_SERVER_HOST" envDefault:"0.0.0.0"` WebsocketServerPort string `env:"KOZMO_WEBSOCKET_SERVER_PORT" envDefault:"8002"` WebsocketServerConnectionHost string `env:"KOZMO_WEBSOCKET_CONNECTION_HOST" envDefault:"0.0.0.0"` WebsocketServerConnectionPort string `env:"KOZMO_WEBSOCKET_CONNECTION_PORT" envDefault:"80"` WebsocketServerConnectionHostSouthAsia string `env:"KOZMO_WEBSOCKET_CONNECTION_HOST_SOUTH_ASIA" envDefault:"0.0.0.0"` WebsocketServerConnectionPortSouthAsia string `env:"KOZMO_WEBSOCKET_CONNECTION_PORT_SOUTH_ASIA" envDefault:"80"` WebsocketServerConnectionHostEastAsia string `env:"KOZMO_WEBSOCKET_CONNECTION_HOST_EAST_ASIA" envDefault:"0.0.0.0"` WebsocketServerConnectionPortEastAsia string `env:"KOZMO_WEBSOCKET_CONNECTION_PORT_EAST_ASIA" envDefault:"80"` WebsocketServerConnectionHostCenterEurope string `env:"KOZMO_WEBSOCKET_CONNECTION_HOST_CENTER_EUROPE" envDefault:"0.0.0.0"` WebsocketServerConnectionPortCenterEurope string `env:"KOZMO_WEBSOCKET_CONNECTION_PORT_CENTER_EUROPE" envDefault:"80"` WSSEnabled string `env:"KOZMO_WSS_ENABLED" envDefault:"false"` // key for idconvertor RandomKey string `env:"KOZMO_RANDOM_KEY" envDefault:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"` // storage config PostgresAddr string `env:"KOZMO_PG_ADDR" envDefault:"localhost"` PostgresPort string `env:"KOZMO_PG_PORT" envDefault:"5432"` PostgresUser string `env:"KOZMO_PG_USER" envDefault:"kozmo_builder"` PostgresPassword string `env:"KOZMO_PG_PASSWORD" envDefault:"71De5JllWSetLYU"` PostgresDatabase string `env:"KOZMO_PG_DATABASE" envDefault:"kozmo_builder"` // cache config RedisAddr string `env:"KOZMO_REDIS_ADDR" envDefault:"localhost"` RedisPort string `env:"KOZMO_REDIS_PORT" envDefault:"6379"` RedisPassword string `env:"KOZMO_REDIS_PASSWORD" envDefault:"kozmo2022"` RedisDatabase int `env:"KOZMO_REDIS_DATABASE" envDefault:"0"` // drive config DriveType string `env:"KOZMO_DRIVE_TYPE" envDefault:""` DriveAccessKeyID string `env:"KOZMO_DRIVE_ACCESS_KEY_ID" envDefault:""` DriveAccessKeySecret string `env:"KOZMO_DRIVE_ACCESS_KEY_SECRET" envDefault:""` DriveRegion string `env:"KOZMO_DRIVE_REGION" envDefault:""` DriveEndpoint string `env:"KOZMO_DRIVE_ENDPOINT" envDefault:""` DriveSystemBucketName string `env:"KOZMO_DRIVE_SYSTEM_BUCKET_NAME" envDefault:"kozmo-cloud"` DriveTeamBucketName string `env:"KOZMO_DRIVE_TEAM_BUCKET_NAME" envDefault:"kozmo-cloud-team"` DriveUploadTimeoutRaw string `env:"KOZMO_DRIVE_UPLOAD_TIMEOUT" envDefault:"30s"` DriveUploadTimeout time.Duration // supervisor API KozmoSupervisorInternalRestAPI string `env:"KOZMO_SUPERVISOR_INTERNAL_API" envDefault:"http://127.0.0.1:9001/api/v1"` // peripheral API KozmoPeripheralAPI string `env:"KOZMO_PERIPHERAL_API" envDefault:"https://peripheral-api.kozmoai.com/v1/"` // kozmo marketplace config KozmoMarketplaceInternalRestAPI string `env:"KOZMO_MARKETPLACE_INTERNAL_API" envDefault:"http://kozmo-marketplace-backend-internal:9003/api/v1"` // token for internal api ControlToken string `env:"KOZMO_CONTROL_TOKEN" envDefault:""` // google config KozmoGoogleSheetsClientID string `env:"KOZMO_GS_CLIENT_ID" envDefault:""` KozmoGoogleSheetsClientSecret string `env:"KOZMO_GS_CLIENT_SECRET" envDefault:""` KozmoGoogleSheetsRedirectURI string `env:"KOZMO_GS_REDIRECT_URI" envDefault:""` // toke for ip zone detector KozmoIPZoneDetectorToken string `env:"KOZMO_IP_ZONE_DETECTOR_TOKEN" envDefault:""` // kozmo drive config KozmoDriveRestAPI string `env:"KOZMO_DRIVE_API" envDefault:"http://kozmo-drive-backend:8004"` // contains filtered or unexported fields }
func GetInstance ¶
func GetInstance() *Config
func (*Config) GetAWSS3AccessKeyID ¶
func (*Config) GetAWSS3AccessKeySecret ¶
func (*Config) GetAWSS3Endpoint ¶
func (*Config) GetAWSS3Region ¶
func (*Config) GetAWSS3SystemBucketName ¶
func (*Config) GetAWSS3TeamBucketName ¶
func (*Config) GetAWSS3Timeout ¶
func (*Config) GetControlToken ¶
func (*Config) GetDriveType ¶
func (*Config) GetIPZoneDetectorToken ¶
func (*Config) GetKozmoDriveAPIForSDK ¶
func (*Config) GetKozmoGoogleSheetsClientID ¶
func (*Config) GetKozmoGoogleSheetsClientSecret ¶
func (*Config) GetKozmoGoogleSheetsRedirectURI ¶
func (*Config) GetKozmoMarketplaceInternalRestAPI ¶
func (*Config) GetKozmoPeripheralAPI ¶
func (*Config) GetKozmoSupervisorInternalRestAPI ¶
func (*Config) GetMINIOAccessKeyID ¶
func (*Config) GetMINIOAccessKeySecret ¶
func (*Config) GetMINIOEndpoint ¶
func (*Config) GetMINIOSystemBucketName ¶
func (*Config) GetMINIOTeamBucketName ¶
func (*Config) GetMINIOTimeout ¶
func (*Config) GetPostgresAddr ¶
func (*Config) GetPostgresDatabase ¶
func (*Config) GetPostgresPassword ¶
func (*Config) GetPostgresPort ¶
func (*Config) GetPostgresUser ¶
func (*Config) GetRandomKey ¶
func (*Config) GetRedisAddr ¶
func (*Config) GetRedisDatabase ¶
func (*Config) GetRedisPassword ¶
func (*Config) GetRedisPort ¶
func (*Config) GetRuntimeEnv ¶
func (*Config) GetSecretKey ¶
func (*Config) GetWebScoketServerConnectionAddress ¶
func (*Config) GetWebScoketServerConnectionAddressCenterEurope ¶
func (*Config) GetWebScoketServerConnectionAddressEastAsia ¶
func (*Config) GetWebScoketServerConnectionAddressSouthAsia ¶
func (*Config) GetWebScoketServerListenAddress ¶
func (*Config) GetWebsocketProtocol ¶
func (*Config) GetkozmoResourceManagerInternalRestAPI ¶
func (*Config) GetkozmoResourceManagerRestAPI ¶
func (*Config) IsAWSTypeDrive ¶
func (*Config) IsCloudBetaMode ¶
func (*Config) IsCloudMode ¶
func (*Config) IsCloudProductionMode ¶
func (*Config) IsCloudTestMode ¶
func (*Config) IsMINIODrive ¶
func (*Config) IsSelfHostMode ¶
Click to show internal directories.
Click to hide internal directories.