Documentation ¶
Index ¶
- Constants
- Variables
- func AppendStrings(strings ...string) string
- func CreateUuid() string
- func IsUrl(checkUrl string) error
- func IsValidId(id string) bool
- func Join(stringSlice []string, delimiter string, enclosure string) string
- func MakePrepareForInExpression(target interface{}) (string, map[string]interface{})
- func MergeMap(baseMap map[string]interface{}, mergeMaps ...map[string]interface{}) map[string]interface{}
- func RemoveDuplicate(args []string) []string
- func SearchStringValueInSlice(slice []string, value string) bool
- type Config
- type Datastore
- type Dispatcher
- type JSONText
- type Logging
- type Messaging
- type Notification
- type RealtimeServer
- type Storage
- type WorkFunc
Constants ¶
View Source
const ( APP_NAME = "swagchat-api" API_VERSION = "v0" BUILD_VERSION = "v0.4.0" )
Variables ¶
View Source
var ( Cfg *Config IsShowVersion bool )
View Source
var AppLogger *zap.Logger
Functions ¶
func AppendStrings ¶
func CreateUuid ¶
func CreateUuid() string
func RemoveDuplicate ¶
func SearchStringValueInSlice ¶ added in v0.2.0
Types ¶
type Config ¶
type Config struct { Version string Port string Profiling bool ErrorLogging bool `yaml:"errorLogging"` Logging *Logging Storage *Storage Datastore *Datastore Messaging *Messaging Notification *Notification RealtimeServer *RealtimeServer `yaml:"realtimeServer"` }
type Datastore ¶ added in v0.4.0
type Datastore struct { Provider string TableNamePrefix string `yaml:"tableNamePrefix"` // SQLite SqlitePath string `yaml:"sqlitePath"` // MySQL, GCP SQL User string Password string Database string MasterHost string `yaml:"masterHost"` MasterPort string `yaml:"masterPort"` MaxIdleConnection string `yaml:"maxIdleConnection"` MaxOpenConnection string `yaml:"maxOpenConnection"` UseSSL string `yaml:"useSSL"` // "on" or "off" ServerName string `yaml:"serverName"` // For GcpSQL, set SqlInstanceId. ServerCaPath string `yaml:"serverCaPath"` ClientCertPath string `yaml:"clientCertPath"` ClientKeyPath string `yaml:"clientKeyPath"` // GCP SQL GcpProjectId string `yaml:"gcpProjectId"` }
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher(max int) *Dispatcher
func (*Dispatcher) Wait ¶
func (d *Dispatcher) Wait()
type JSONText ¶
type JSONText json.RawMessage
func (JSONText) MarshalJSON ¶
MarshalJSON returns j as the JSON encoding of j.
func (*JSONText) UnmarshalJSON ¶
UnmarshalJSON sets *j to a copy of data
type Notification ¶ added in v0.4.0
type Notification struct { Provider string RoomTopicNamePrefix string `yaml:"roomTopicNamePrefix"` // AWS SNS AwsRegion string `yaml:"awsRegion"` AwsAccessKeyId string `yaml:"awsAccessKeyId"` AwsSecretAccessKey string `yaml:"awsSecretAccessKey"` AwsApplicationArnIos string `yaml:"awsApplicationArnIos"` AwsApplicationArnAndroid string `yaml:"awsApplicationArnAndroid"` }
type RealtimeServer ¶
type RealtimeServer struct {
Endpoint string
}
type Storage ¶ added in v0.4.0
type Storage struct { Provider string UploadBucket string `yaml:"uploadBucket"` UploadDirectory string `yaml:"uploadDirectory"` ThumbnailBucket string `yaml:"thumbnailBucket"` ThumbnailDirectory string `yaml:"thumbnailDirectory"` // Local BaseUrl string `yaml:"baseUrl"` LocalPath string `yaml:"localPath"` // GCP Storage GcpProjectId string `yaml:"gcpProjectId"` GcpJwtPath string `yaml:"gcpJwtPath"` // AWS S3 AwsRegion string `yaml:"awsRegion"` AwsAccessKeyId string `yaml:"awsAccessKeyId"` AwsSecretAccessKey string `yaml:"AwsSecretAccessKey"` }
Click to show internal directories.
Click to hide internal directories.