Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORSConfig ¶ added in v0.4.1
type CORSConfig struct { // Enable CORS for the server (default: true) Enabled bool `yaml:"enabled" default:"true"` AllowedOrigins []string `yaml:"allowedorigins"` AllowedMethods []string `yaml:"allowedmethods"` AllowedHeaders []string `yaml:"allowedheaders"` ExposedHeaders []string `yaml:"exposedheaders"` AllowCredentials bool `yaml:"allowcredentials" default:"true"` MaxAge int `yaml:"maxage" default:"3600"` }
CORS Configuration for the server
type Config ¶
type Config struct { Auth auth.Config `yaml:"auth"` GRPC GRPCConfig `yaml:"grpc"` CryptoProvider security.Config `yaml:"cryptoProvider"` TLS TLSConfig `yaml:"tls"` CORS CORSConfig `yaml:"cors"` WellKnownConfigRegister func(namespace string, config any) error // Port to listen on Port int `yaml:"port" default:"8080"` Host string `yaml:"host,omitempty"` // Enable pprof EnablePprof bool `mapstructure:"enable_pprof" default:"false"` }
Configurations for the server
type GRPCConfig ¶
type GRPCConfig struct { // Enable reflection for grpc server (default: true) ReflectionEnabled bool `yaml:"reflectionEnabled" default:"true"` MaxCallRecvMsgSizeBytes int `yaml:"maxCallRecvMsgSize" default:"4194304"` // 4MB = 4 * 1024 * 1024 = 4194304 MaxCallSendMsgSizeBytes int `yaml:"maxCallSendMsgSize" default:"4194304"` // 4MB = 4 * 1024 * 1024 = 4194304 }
GRPC Server specific configurations
type OpenTDFServer ¶
type OpenTDFServer struct { AuthN *auth.Authentication Mux *runtime.ServeMux HTTPServer *http.Server GRPCServer *grpc.Server GRPCInProcess *inProcessServer CryptoProvider security.CryptoProvider // contains filtered or unexported fields }
func NewOpenTDFServer ¶
func NewOpenTDFServer(config Config, logger *logger.Logger) (*OpenTDFServer, error)
func (OpenTDFServer) Start ¶
func (s OpenTDFServer) Start()
func (OpenTDFServer) Stop ¶
func (s OpenTDFServer) Stop()
Click to show internal directories.
Click to hide internal directories.