Documentation ¶
Index ¶
- func BuildDetails() string
- func ExecutableChecksum() []byte
- func Register(app *cli.Cli, configBucket, envPrefix string)
- func Version() string
- type Cli
- type Config
- type Encryption
- type GRPCConf
- type HTTPConf
- type JwtTTL
- type KeyGeneration
- type LoggerConfig
- type MetricsConf
- type Options
- type Sign
- type StoreClientTLSConfig
- type StoreConfig
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDetails ¶
func BuildDetails() string
BuildDetails returns a string containing details about the JWTIS binary.
func ExecutableChecksum ¶
func ExecutableChecksum() []byte
ExecutableChecksum returns a byte slice containing the SHA256 checksum of the executable. It returns a nil slice if there's an error trying to calculate the checksum.
Types ¶
type Cli ¶
type Cli struct {
// contains filtered or unexported fields
}
Cli represents the structure of a CLI app. It should be constructed using the App() function
func App ¶
App creates a new and empty CLI app configured with the passed name and description. name and description will be used to construct the help message for the app:
Usage: $name [OPTIONS] COMMAND [arg...] $desc
type Config ¶
type Config struct { // defaults `yaml:"-"` Options `json:"Options" yaml:"Options"` StoreConfig *StoreConfig `json:"StoreConfig" yaml:"StoreConfig"` LoggerConfig *LoggerConfig `json:"LoggerConfig" yaml:"LoggerConfig"` // contains filtered or unexported fields }
Config contains app option values
type Encryption ¶
type Encryption struct { EncAlg *string `json:"EncAlg" yaml:"EncAlg"` // Default algorithm to be used for encrypt EncBits *int `json:"EncBits" yaml:"EncBits"` // Default key size in bits for encrypt ContEnc *string `json:"ContEnc" yaml:"ContEnc"` // Default Content Encryption }
Encryption config
type GRPCConf ¶ added in v0.7.1
type GRPCConf struct { ListenGRPC *string `json:"ListenGRPC" yaml:"ListenGRPC"` MaxRecvMsgSize int `json:"MaxRecvMsgSize" yaml:"MaxRecvMsgSize"` MaxSendMsgSize int `json:"MaxSendMsgSize" yaml:"MaxSendMsgSize"` }
GRPCConf config
type HTTPConf ¶
type HTTPConf struct { ListenMetrics *string `json:"ListenMetrics" yaml:"ListenMetrics"` // ip:port to listen to TLS *bool `json:"TLS" yaml:"TLS"` // Future feature TLSConfig `json:"TLSConfig" yaml:"TLSConfig"` }
HTTPConf config
type JwtTTL ¶
type JwtTTL struct { AuthTTL *string `json:"AuthTTL" yaml:"AuthTTL"` // Default value for auth jwt ttl RefreshTTL *string `json:"RefreshTTL" yaml:"RefreshTTL"` // Default value for refresh jwt ttl }
JwtTTL config
type KeyGeneration ¶
type KeyGeneration struct { // keys generation options Sign `json:"Sign" yaml:"Sign"` Encryption `json:"Encryption" yaml:"Encryption"` Expiry *string `json:"Expiry" yaml:"Expiry"` JwtTTL `json:"JwtTTL" yaml:"JwtTTL"` }
KeyGeneration config
type LoggerConfig ¶ added in v0.7.1
type LoggerConfig struct { LogFileName string `json:"LogFileName" yaml:"LogFileName"` // file to write logs to LogMaxSize int `json:"LogMaxSize" yaml:"LogMaxSize"` // megabytes LogMaxAge int `json:"LogMaxAge" yaml:"LogMaxAge"` // maximum number of days to retain old log files LogMaxBackUp int `json:"LogMaxBackUp" yaml:"LogMaxBackUp"` // maximum number of old log files to retain LogCompress bool `json:"LogCompress" yaml:"LogCompress"` // determines if the rotated log files should be compressed LogLocalTime bool `json:"LogLocalTime" yaml:"LogLocalTime"` // use local or UTC time in filename LogLevel string `json:"LogLevel" yaml:"LogLevel"` // priority is for config.Verbose LogFileSave bool `json:"LogFileSave" yaml:"LogFileSave"` }
LoggerConfig contains lumberjack options
type MetricsConf ¶ added in v0.7.1
type MetricsConf struct { ListenMetrics *string `json:"ListenMetrics" yaml:"ListenMetrics"` // ip:port to listen to GRPCHistogram bool `json:"GRPCHistogram" yaml:"GRPCHistogram"` DisableMetrics bool `json:"DisableMetrics" yaml:"DisableMetrics"` }
MetricsConf config
type Options ¶
type Options struct { TLS *bool `json:"TLS" yaml:"TLS"` // Future feature TLSConfig `json:"TLSConfig" yaml:"TLSConfig"` GRPCConf `json:"GrpcConf" yaml:"GrpcConf"` MetricsConf `json:"MetricsConf" yaml:"MetricsConf"` KeyGeneration `json:"KeyGeneration" yaml:"KeyGeneration"` SelfName *string `json:"SelfName" yaml:"SelfName"` // Name of this service // Later user must provide a password to access the database LogPath *string `json:"LogPath" yaml:"LogPath"` DBConfig *string `json:"DBConfig" yaml:"DBConfig"` ConfigFile *string `json:"ConfigFile" yaml:"ConfigFile"` Verbose *bool `json:"Verbose" yaml:"Verbose"` // contains filtered or unexported fields }
Options config
type Sign ¶
type Sign struct { SigAlg *string `json:"SigAlg" yaml:"SigAlg"` // Default algorithm to be used for sign SigBits *int `json:"SigBits" yaml:"SigBits"` // Default key size in bits for sign }
Sign holds default keys generation options
type StoreClientTLSConfig ¶
type StoreClientTLSConfig struct { CertFile string `json:"CertFile" yaml:"CertFile"` KeyFile string `json:"KeyFile" yaml:"KeyFile"` CACertFile string `json:"CACertFile" yaml:"CACertFile"` InsecureSkipVerify bool `json:"InsecureSkipVerify" yaml:"InsecureSkipVerify"` }
StoreClientTLSConfig config
type StoreConfig ¶
type StoreConfig struct { ClientTLS *StoreClientTLSConfig `json:"ClientTLS" yaml:"ClientTLS"` // ConnectionTimeout is time.Duration in string format ConnectionTimeout string `json:"ConnectionTimeout" yaml:"ConnectionTimeout"` // SyncPeriod is time.Duration in string format SyncPeriod string `json:"SyncPeriod" yaml:"SyncPeriod"` // Bucket string `json:"Bucket" yaml:"Bucket"` PersistConnection bool `json:"PersistConnection" yaml:"PersistConnection"` Username string `json:"Username" yaml:"Username"` Password string `json:"Password" yaml:"Password"` Token string `json:"Token" yaml:"Token"` }
StoreConfig config