config

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config provides a struct that can store json type config file

Package config provides a struct that can store json type config file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[T any](fileName string) (T, error)

Types

type CloudEventsServer added in v1.1.0

type CloudEventsServer struct {
	Address         string `json:"address" `
	ShutdownTimeout string `json:"shutdownTimeout"`
}

type GrpcServer

type GrpcServer struct {
	Address string `json:"address"`

	Log struct {
		Level  string `json:"level"`
		Output string `json:"output"`
		File   struct {
			Name          string `json:"name"`
			ExtensionName string `json:"extensionName"`
			AddDate       bool   `json:"addDate"`
		} `json:"file"`
		WithCallerInfo bool `json:"withCallerInfo"`
	} `json:"log"`
}

type HttpServer

type HttpServer struct {
	SwaggerAddress string `json:"swagger_address"`
	SwaggerUri     string `json:"swagger_uri"`

	ServerAddress   string `json:"server_address"`
	ShutdownTimeout string `json:"shutdownTimeout"`

	Log struct {
		Level  string `json:"level"`
		Output string `json:"output"`
		File   struct {
			Name          string `json:"name"`
			ExtensionName string `json:"extensionName"`
			AddDate       bool   `json:"addDate"`
		} `json:"file"`
		WithCallerInfo bool `json:"withCallerInfo"`
	} `json:"log"`
}

type LongPollingServer

type LongPollingServer struct {
	Address         string `json:"address"`
	TimeoutSeconds  int    `json:"timeoutSeconds"`
	ShutdownTimeout string `json:"shutdownTimeout"`

	SubscriptionURI string `json:"subscriptionUri"`
	PublishURI      string `json:"publishUri"`

	FilePersistorInfo struct {
		Use                     bool   `json:"use"`
		FileName                string `json:"fileName"`
		WriteBufferSize         int    `json:"writeBufferSize"`
		WriteFlushPeriodSeconds int    `json:"writeFlushPeriodSeconds"`
	} `json:"file_persistor_info"`

	Log struct {
		Level  string `json:"level"`
		Output string `json:"output"`
		File   struct {
			Name          string `json:"name"`
			ExtensionName string `json:"extensionName"`
			AddDate       bool   `json:"addDate"`
		} `json:"file"`
		WithCallerInfo bool `json:"withCallerInfo"`
	} `json:"log"`
}

type Sample

type Sample struct {
	Log struct {
		Level  string `json:"level"`
		Output string `json:"output"`
		File   struct {
			Name          string `json:"name"`
			ExtensionName string `json:"extensionName"`
			AddDate       bool   `json:"addDate"`
		} `json:"file"`
		WithCallerInfo bool `json:"withCallerInfo"`
	} `json:"log"`
}

type SocketServer

type SocketServer struct {
	Address        string `json:"address"`
	ClientPoolSize int    `json:"client_pool_size"`

	Log struct {
		Level  string `json:"level"`
		Output string `json:"output"`
		File   struct {
			Name          string `json:"name"`
			ExtensionName string `json:"extensionName"`
			AddDate       bool   `json:"addDate"`
		} `json:"file"`
		WithCallerInfo bool `json:"withCallerInfo"`
	} `json:"log"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL