Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
32
pkg/common/certificate_request.go
Normal file
32
pkg/common/certificate_request.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package common
|
||||
|
||||
import "fmt"
|
||||
|
||||
// CertificateRequest schema
|
||||
type CertificateRequest struct {
|
||||
CommonName string `json:"common_name" validate:"required,max=100"`
|
||||
CertificateType string `json:"type" validate:"max=100"`
|
||||
}
|
||||
|
||||
type CertificateRevokeRequest struct {
|
||||
Serial string `json:"serial_number" validate:"required,serial,max=1000"`
|
||||
CertificateType string `json:"type" validate:"max=100"`
|
||||
}
|
||||
|
||||
type CertificateRenewRequest struct {
|
||||
Type string `json:"type" validate:"required,max=10000"`
|
||||
CommonName string `json:"common_name" validate:"max=100"`
|
||||
}
|
||||
|
||||
type UpdateCert struct {
|
||||
SSLCertBase64 string `json:"ssl_cert_base64"`
|
||||
}
|
||||
|
||||
type CertificateInstallRequest struct {
|
||||
VIN string `pg:",pk" json:"vin" validate:"required,vin"`
|
||||
ICCID string `json:"iccid,omitempty" validate:"omitempty,max=50"`
|
||||
}
|
||||
|
||||
func (c CertificateRequest) String() string {
|
||||
return fmt.Sprintf("CertificateRequest for Common Name<%s>", c.CommonName)
|
||||
}
|
||||
Reference in New Issue
Block a user