Skip to content

Commit

Permalink
Merge pull request #44 from robotLJW/main
Browse files Browse the repository at this point in the history
[feat] add db config struct
  • Loading branch information
tianxiaoliang authored Dec 8, 2021
2 parents 302dc83 + 0e67599 commit 78a52aa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ defines a common interface to encrypt and decrypt info
## rbac
defines a common struct to account and role info

### db
defines a config struct to connect db

## sync
defines common structs for synchronization mechanism, synchronize data to different peer clusters
33 changes: 33 additions & 0 deletions db/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package db

import "time"

type Config struct {
Kind string `yaml:"kind"`
URI string `yaml:"uri"`
PoolSize int `yaml:"poolSize"`
SSLEnabled bool `yaml:"sslEnabled"`
VerifyPeer bool `yaml:"verifyPeer"`
RootCA string `yaml:"rootCAFile"`
CertFile string `yaml:"certFile"`
KeyFile string `yaml:"keyFile"`
CertPwdFile string `yaml:"certPwdFile"`
Timeout time.Duration `yaml:"timeout"`
}

0 comments on commit 78a52aa

Please sign in to comment.