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
- type ApiServer
- type AwsS3
- type AwsSns
- type Config
- type Dispatcher
- type GcpPubsub
- type GcpSql
- type GcpStorage
- type JSONText
- type LocalStorage
- type Mysql
- type RealtimeServer
- type Sqlite
- type WorkFunc
Constants ¶
View Source
const ( APP_NAME = "swagchat-api" API_VERSION = "v0" DEFAULT_SERVER_PORT = "9000" DEFAULT_PROFILING = "" DEFAULT_SERVER_LOGGING_LEVEL = "development" DEFAULT_STORAGE = "local" DEFAULT_DATASTORE = "sqlite" DEFAULT_MESSAGING = "" DEFAULT_NOTIFICATION = "" DEFAULT_REALTIMESERVER_ENDPOINT = "" DEFAULT_LOCAL_STORAGE_BASE_URL = "http://localhost:9000/" + API_VERSION DEFAULT_LOCAL_STORAGE_PATH = "data/assets" DEFAULT_MYSQL_MAXIDLECONNECTION = "10" DEFAULT_MYSQL_MAXOPENCONNECTION = "10" DEFAULT_SQLITE_DATABASE_PATH = "/tmp/swagchat_test.db" DEFAULT_MYSQL_USESSL = "" )
Variables ¶
View Source
var AppLogger *zap.Logger
Functions ¶
func AppendStrings ¶
func CreateUuid ¶
func CreateUuid() string
func RemoveDuplicate ¶
Types ¶
type Config ¶
type Config struct { ApiServer *ApiServer RealtimeServer *RealtimeServer // Storage LocalStorage *LocalStorage GcpStorage *GcpStorage AwsS3 *AwsS3 // Datastore Sqlite *Sqlite Mysql *Mysql GcpSql *GcpSql // Messaging GcpPubsub *GcpPubsub // Notification AwsSns *AwsSns }
var Cfg *Config = &Config{ ApiServer: &ApiServer{}, RealtimeServer: &RealtimeServer{}, LocalStorage: &LocalStorage{}, GcpStorage: &GcpStorage{}, AwsS3: &AwsS3{}, Mysql: &Mysql{}, Sqlite: &Sqlite{}, GcpSql: &GcpSql{}, GcpPubsub: &GcpPubsub{}, AwsSns: &AwsSns{}, }
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 GcpStorage ¶
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 LocalStorage ¶
type RealtimeServer ¶
type RealtimeServer struct {
Endpoint string
}
Click to show internal directories.
Click to hide internal directories.