Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFromEnv ¶
func LoadFromEnv(pointer ...interface{}) error
Types ¶
type Cassandra ¶
type Cassandra struct { CassandraKeySpace string `split_words:"true" default:"test"` CassandraPort string `split_words:"true" default:"9042"` CassandraHosts []string `split_words:"true" default:"127.0.0.1"` CassandraForcePassword bool `split_words:"true" default:"false"` CassandraUsername string `split_words:"true" default:"cassandra"` CassandraPassword string `split_words:"true" default:"cassandra"` CassandraTimeout time.Duration `split_words:"true" default:"600s"` CassandraConnectionTimeout time.Duration `split_words:"true" default:"600s"` ReconnectInterval time.Duration `split_words:"true" default:"60s"` CassandraNumConnection int `split_words:"true" default:"5"` DisableInitialHostLookup bool `split_words:"true" default:"false"` }
Cassandra type
func NewCassandra ¶
type Cloud ¶
type Cloud struct { ProjectID string `split_words:"true" default:"test-project"` EndPoint string `split_words:"true" default:"localhost:9010"` WithoutAuthentication bool `split_words:"true" default:"true"` GRPCInsecure bool `split_words:"true" default:"true"` }
Cloud type
type Cockroach ¶
type Cockroach struct { CockroachUsername string `split_words:"true" default:"root"` CockroachPassword string `split_words:"true" default:""` CockroachHost string `split_words:"true" default:"localhost"` CockroachPort string `split_words:"true" default:"26257"` CockroachDatabase string `split_words:"true" default:"defaultdb"` CockroachSSLMode string `split_words:"true" default:"disable"` CockroachURL string `split_words:"true" default:"postgres://root@localhost:26257/defaultdb?sslmode=disable"` CockroachTxTimeout time.Duration `split_words:"true" default:"5s"` }
Cockroach type
func NewCockroach ¶
type Core ¶
type Core struct { LoggerMode string `split_words:"true" default:"customized"` SystemName string `split_words:"true" default:"system"` }
Core type
type Firebase ¶
type Firebase struct { FirebaseConfigJSON string `split_words:"true" default:""` FirebaseProjectID string `split_words:"true" default:""` }
Firebase type
func NewFirebase ¶
type Firestore ¶ added in v0.0.8
type Firestore struct { ProjectID string `split_words:"true" default:""` EndPoint string `split_words:"true" default:""` }
Firestore type
type GRPC ¶
type GRPC struct { Port string `split_words:"true" default:"38080"` NoTLS bool `split_words:"true" default:"true"` // use WithInsecure option SkipTLS bool `split_words:"true" default:"false"` // use WithTransportCredentials option and include InsecureSkipVerify=true ALTS bool `split_words:"true" default:"false"` // client use grpc.WithTransportCredentials(alts.NewClientCreds(alts.DefaultClientOptions())); server use grpc.Creds(alts.NewServerCreds(alts.DefaultServerOptions())) KeepAliveTime time.Duration `split_words:"true" default:"1s"` // second KeepAliveTimeout time.Duration `split_words:"true" default:"20s"` //second KeepAlivePermitWithoutStream bool `split_words:"true" default:"true"` AllowedList []string `split_words:"true" default:"/auth.Auth/Ping,/auth.Auth/Authorization"` }
GRPC type
type JWT ¶
type JWT struct { MetadataClientIDKey string `split_words:"true" default:"authorization-clientID"` EcdsaPrivateKeyPath string `split_words:"true" default:"./es256_private.pem"` EcdsaPrivateKey string `split_words:"true" default:""` RsaPrivateKeyPath string `split_words:"true" default:"./rs256-private.pem"` RsaPrivateKey string `split_words:"true" default:""` HmacSecretKeyPath string `split_words:"true" default:"./hs-secret.pem"` HmacSecretKey string `split_words:"true" default:""` }
JWT type
type Mongo ¶ added in v0.0.14
type Mongo struct { MongoProtocol string `split_words:"true" default:"mongodb+srv"` MongoUsername string `split_words:"true" default:""` MongoPassword string `split_words:"true" default:""` MongoHost string `split_words:"true" default:""` MongoDatabase string `split_words:"true" default:""` MongoAuthSource bool `split_words:"true" default:""` MongoIgnoreQueryString bool `split_words:"true" default:""` }
Mongo type
type Postgres ¶ added in v0.0.12
type Postgres struct { PostgresUsername string `split_words:"true" default:"postgres"` PostgresPassword string `split_words:"true" default:"postgres"` PostgresHost string `split_words:"true" default:"localhost"` PostgresPort string `split_words:"true" default:"5432"` PostgresDatabase string `split_words:"true" default:"postgres"` PostgresSSLMode string `split_words:"true" default:"disable"` PostgresURL string `split_words:"true" default:"postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable"` PostgresTxTimeout time.Duration `split_words:"true" default:"5s"` }
Postgres type
func NewPostgres ¶ added in v0.0.12
type Postgresql ¶ added in v0.0.11
type Postgresql struct { PostgresqlUsername string `split_words:"true" default:"root"` PostgresqlPassword string `split_words:"true" default:""` PostgresqlHost string `split_words:"true" default:"localhost"` PostgresqlPort string `split_words:"true" default:"26257"` PostgresqlDatabase string `split_words:"true" default:"defaultdb"` PostgresqlSSLMode string `split_words:"true" default:"disable"` PostgresqlURL string `split_words:"true" default:"postgres://root@localhost:26257/defaultdb?sslmode=disable"` PostgresqlTxTimeout time.Duration `split_words:"true" default:"5s"` }
Postgresql type
type PubSub ¶ added in v0.0.2
type PubSub struct { ProjectID string `split_words:"true" default:"test-project"` EndPoint string `split_words:"true" default:"localhost:9010"` WithoutAuthentication bool `split_words:"true" default:"true"` GRPCInsecure bool `split_words:"true" default:"true"` }
PubSub type
type Redis ¶ added in v0.0.12
type Redis struct { RedisUsername string `split_words:"true" default:""` RedisPassword string `split_words:"true" default:""` RedisClientName string `split_words:"true" default:""` RedisHost string `split_words:"true" default:"localhost"` RedisPort string `split_words:"true" default:"6379"` RedisPoolSize int `split_words:"true" default:"10"` }
Redis type
type Server ¶
type Server struct { ReleaseMode bool `split_words:"true" default:"true"` Port string `split_words:"true" default:"38080"` MetricsPort string `split_words:"true" default:"38090"` ServerTimeout time.Duration `split_words:"true" default:"5s"` PrefixMessage string `split_words:"true" default:"error gin server"` CustomizedRender bool `split_words:"true" default:"false"` AllowAllOrigins bool `split_words:"true" default:"false"` AllowOrigins []string `split_words:"true" default:"http://localhost,https://localhost"` AllowedPaths []string `split_words:"true" default:"/favicon.ico,/ping,/metrics,/api/auth/v1/authorization,/narrow_cast_schedule"` JWTGuard bool `split_words:"true" default:"true"` MaxMultipartMemoryMB int64 `split_words:"true" default:"8"` }
Server type
type Set ¶
type Spanner ¶
type Spanner struct { ProjectID string `split_words:"true" default:"test-project"` Instance string `split_words:"true" default:"test-instance"` Database string `split_words:"true" default:"test-database"` EndPoint string `split_words:"true" default:"localhost:9010"` WithoutAuthentication bool `split_words:"true" default:"true"` GRPCInsecure bool `split_words:"true" default:"true"` }
Spanner type
func NewSpanner ¶
Click to show internal directories.
Click to hide internal directories.