Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(server *grpc.Server, handler *RequestHandler)
Register registers the handler instance with a gRPC server.
Types ¶
type APIsConfig ¶
Config represent application configuration
func (*APIsConfig) Validate ¶
func (c *APIsConfig) Validate() error
type CertificateSigner ¶
type ClientsConfig ¶ added in v2.4.0
type ClientsConfig struct {
OpenTelemetryCollector otelClient.Config `yaml:"openTelemetryCollector" json:"openTelemetryCollector"`
}
func (*ClientsConfig) Validate ¶ added in v2.4.0
func (c *ClientsConfig) Validate() error
type Config ¶
type Config struct { Log log.Config `yaml:"log" json:"log"` APIs APIsConfig `yaml:"apis" json:"apis"` Signer SignerConfig `yaml:"signer" json:"signer"` Clients ClientsConfig `yaml:"clients" json:"clients"` }
type RequestHandler ¶
type RequestHandler struct { pb.UnimplementedCertificateAuthorityServer ValidFrom func() time.Time ValidFor time.Duration Certificate []*x509.Certificate PrivateKey crypto.PrivateKey Config Config }
RequestHandler handles incoming requests.
func NewRequestHandler ¶
func NewRequestHandler( ValidFrom func() time.Time, ValidFor time.Duration, Certificate []*x509.Certificate, PrivateKey crypto.PrivateKey, cfg Config, ) *RequestHandler
NewRequestHandler factory for new RequestHandler.
func NewRequestHandlerFromConfig ¶
func NewRequestHandlerFromConfig(cfg Config) (*RequestHandler, error)
func (*RequestHandler) SignCertificate ¶
func (r *RequestHandler) SignCertificate(ctx context.Context, req *pb.SignCertificateRequest) (*pb.SignCertificateResponse, error)
func (*RequestHandler) SignIdentityCertificate ¶
func (r *RequestHandler) SignIdentityCertificate(ctx context.Context, req *pb.SignCertificateRequest) (*pb.SignCertificateResponse, error)
type SignerConfig ¶
type SignerConfig struct { KeyFile string `yaml:"keyFile" json:"keyFile" description:"file name of CA private key in PEM format"` CertFile string `yaml:"certFile" json:"certFile" description:"file name of CA certificate in PEM format"` ValidFrom string `yaml:"validFrom" json:"validFrom" description:"format https://github.com/karrick/tparse"` ExpiresIn time.Duration `yaml:"expiresIn" json:"expiresIn"` HubID string `yaml:"hubID" json:"hubId"` }
func (*SignerConfig) Validate ¶
func (c *SignerConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.