2016-02-26 17:25:32 +00:00
|
|
|
// Copyright © 2016 Abcum Ltd
|
|
|
|
//
|
|
|
|
// Licensed 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 cnf
|
|
|
|
|
2016-09-06 10:19:29 +00:00
|
|
|
var Settings *Options
|
|
|
|
|
2016-11-21 18:48:25 +00:00
|
|
|
type Auth struct {
|
|
|
|
Kind int
|
|
|
|
Data interface{}
|
|
|
|
Possible struct {
|
|
|
|
NS string
|
|
|
|
DB string
|
|
|
|
}
|
|
|
|
Selected struct {
|
|
|
|
NS string
|
|
|
|
DB string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-08 17:55:15 +00:00
|
|
|
// Options defines global configuration options
|
2016-03-15 15:05:47 +00:00
|
|
|
type Options struct {
|
2016-04-08 17:55:15 +00:00
|
|
|
DB struct {
|
2016-07-18 22:01:49 +00:00
|
|
|
Key []byte // Data encryption key
|
|
|
|
Code string // Data encruption key string
|
2016-07-04 10:33:07 +00:00
|
|
|
Path string // Path to store the data file
|
2016-04-08 17:55:15 +00:00
|
|
|
Host string // Surreal host to connect to
|
|
|
|
Port string // Surreal port to connect to
|
|
|
|
Base string // Base key to use in KV stores
|
2016-09-06 10:19:29 +00:00
|
|
|
Lang string // Base key to use in KV stores
|
2016-07-19 11:05:11 +00:00
|
|
|
Cert struct {
|
|
|
|
CA string
|
|
|
|
Crt string
|
|
|
|
Key string
|
|
|
|
SSL bool
|
|
|
|
}
|
2016-04-08 17:55:15 +00:00
|
|
|
}
|
2016-02-27 12:04:53 +00:00
|
|
|
|
2016-07-04 10:33:07 +00:00
|
|
|
Port struct {
|
|
|
|
Web int // Web port as an number
|
|
|
|
Tcp int // Tcp port as an number
|
|
|
|
}
|
|
|
|
|
|
|
|
Conn struct {
|
|
|
|
Web string // Web port as a string
|
|
|
|
Tcp string // Tcp port as a string
|
|
|
|
}
|
|
|
|
|
2016-04-08 17:55:15 +00:00
|
|
|
Cert struct {
|
2016-07-04 10:33:07 +00:00
|
|
|
Crt string // File location of server crt
|
|
|
|
Key string // File location of server key
|
2016-04-08 17:55:15 +00:00
|
|
|
}
|
2016-02-27 12:04:53 +00:00
|
|
|
|
2016-04-08 17:55:15 +00:00
|
|
|
Auth struct {
|
2016-11-17 08:47:46 +00:00
|
|
|
Auth string // Master authentication username:password
|
|
|
|
User string // Master authentication username
|
|
|
|
Pass string // Master authentication password
|
2016-04-08 17:55:15 +00:00
|
|
|
}
|
2016-02-26 17:25:32 +00:00
|
|
|
|
2016-04-08 17:55:15 +00:00
|
|
|
Node struct {
|
|
|
|
Host string // Node hostname
|
|
|
|
Name string // Name of this node
|
|
|
|
Uniq string // Uniq of this node
|
|
|
|
UUID string // UUID of this node
|
|
|
|
Attr string // Comma separated tags for this node
|
|
|
|
Tags []string // Slice of tags for this node
|
|
|
|
}
|
|
|
|
|
|
|
|
Cluster struct {
|
|
|
|
Join string // Comma separated peers to join
|
|
|
|
Peer []string // Slice of peers to join
|
|
|
|
}
|
|
|
|
|
2016-07-04 10:33:07 +00:00
|
|
|
Backups struct {
|
|
|
|
Time string
|
|
|
|
Path string
|
|
|
|
}
|
|
|
|
|
2016-04-08 17:55:15 +00:00
|
|
|
Logging struct {
|
|
|
|
Level string // Stores the configured logging level
|
|
|
|
Output string // Stores the configured logging output
|
|
|
|
Format string // Stores the configured logging format
|
|
|
|
Newrelic string // Stores the configured newrelic license key
|
|
|
|
}
|
2016-02-26 17:25:32 +00:00
|
|
|
}
|