certificates

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

The diagnostics functional block contains OCPP 2.0 features than enable remote diagnostics of problems with a charging station.

Index

Constants

View Source
const DeleteCertificateFeatureName = "DeleteCertificate"
View Source
const GetInstalledCertificateIdsFeatureName = "GetInstalledCertificateIds"
View Source
const InstallCertificateFeatureName = "InstallCertificate"
View Source
const ProfileName = "Certificates"

Variables

Functions

This section is empty.

Types

type ChargePointHandler

type ChargePointHandler interface {
	// OnDeleteCertificate is called on a charging station whenever a DeleteCertificateRequest is received from the CSMS.
	OnDeleteCertificate(request *DeleteCertificateRequest) (response *DeleteCertificateResponse, err error)
	// OnGetInstalledCertificateIds is called on a charging station whenever a GetInstalledCertificateIdsRequest is received from the CSMS.
	OnGetInstalledCertificateIds(request *GetInstalledCertificateIdsRequest) (response *GetInstalledCertificateIdsResponse, err error)
	// OnInstallCertificate is called on a charging station whenever an InstallCertificateRequest is received from the CSMS.
	OnInstallCertificate(request *InstallCertificateRequest) (response *InstallCertificateResponse, err error)
}

Needs to be implemented by Charging stations for handling messages part of the OCPP 1.6j security extension.

type DeleteCertificateFeature

type DeleteCertificateFeature struct{}

The CSMS requests the Charging Station to delete a specific installed certificate by sending a DeleteCertificateRequest. The Charging Station responds with a DeleteCertificateResponse.

func (DeleteCertificateFeature) GetFeatureName

func (f DeleteCertificateFeature) GetFeatureName() string

func (DeleteCertificateFeature) GetRequestType

func (f DeleteCertificateFeature) GetRequestType() reflect.Type

func (DeleteCertificateFeature) GetResponseType

func (f DeleteCertificateFeature) GetResponseType() reflect.Type

type DeleteCertificateRequest

type DeleteCertificateRequest struct {
	CertificateHashData types.CertificateHashData `json:"certificateHashData" validate:"required"`
}

The field definition of the DeleteCertificate request payload sent by the CSMS to the Charging Station.

func NewDeleteCertificateRequest

func NewDeleteCertificateRequest(certificateHashData types.CertificateHashData) *DeleteCertificateRequest

Creates a new DeleteCertificateRequest, containing all required fields. There are no optional fields for this message.

func (DeleteCertificateRequest) GetFeatureName

func (r DeleteCertificateRequest) GetFeatureName() string

type DeleteCertificateResponse

type DeleteCertificateResponse struct {
	Status     DeleteCertificateStatus `json:"status" validate:"required,deleteCertificateStatus16"`
	StatusInfo *types.StatusInfo       `json:"statusInfo,omitempty" validate:"omitempty"`
}

This field definition of the DeleteCertificate response payload, sent by the Charging Station to the CSMS in response to a DeleteCertificateRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewDeleteCertificateResponse

func NewDeleteCertificateResponse(status DeleteCertificateStatus) *DeleteCertificateResponse

Creates a new DeleteCertificateResponse, containing all required fields. Optional fields may be set afterwards.

func (DeleteCertificateResponse) GetFeatureName

func (c DeleteCertificateResponse) GetFeatureName() string

type DeleteCertificateStatus

type DeleteCertificateStatus string

Status returned in response to DeleteCertificateRequest.

const (
	DeleteCertificateStatusAccepted DeleteCertificateStatus = "Accepted"
	DeleteCertificateStatusFailed   DeleteCertificateStatus = "Failed"
	DeleteCertificateStatusNotFound DeleteCertificateStatus = "NotFound"
)

type GetInstalledCertificateIdsFeature

type GetInstalledCertificateIdsFeature struct{}

To facilitate the management of the Charging Station’s installed certificates, a method of retrieving the installed certificates is provided. The CSMS requests the Charging Station to send a list of installed certificates by sending a GetInstalledCertificateIdsRequest. The Charging Station responds with a GetInstalledCertificateIdsResponse.

func (GetInstalledCertificateIdsFeature) GetFeatureName

func (f GetInstalledCertificateIdsFeature) GetFeatureName() string

func (GetInstalledCertificateIdsFeature) GetRequestType

func (f GetInstalledCertificateIdsFeature) GetRequestType() reflect.Type

func (GetInstalledCertificateIdsFeature) GetResponseType

func (f GetInstalledCertificateIdsFeature) GetResponseType() reflect.Type

type GetInstalledCertificateIdsRequest

type GetInstalledCertificateIdsRequest struct {
	CertificateTypes []types.CertificateUse `json:"certificateType" validate:"omitempty,dive,certificateUse16"`
}

The field definition of the GetInstalledCertificateIdsRequest PDU sent by the CSMS to the Charging Station.

func NewGetInstalledCertificateIdsRequest

func NewGetInstalledCertificateIdsRequest() *GetInstalledCertificateIdsRequest

Creates a new GetInstalledCertificateIdsRequest, containing all required fields. There are no optional fields for this message.

func (GetInstalledCertificateIdsRequest) GetFeatureName

func (r GetInstalledCertificateIdsRequest) GetFeatureName() string

type GetInstalledCertificateIdsResponse

type GetInstalledCertificateIdsResponse struct {
	Status                   GetInstalledCertificateStatus    `json:"status" validate:"required,getInstalledCertificateStatus16"`
	StatusInfo               *types.StatusInfo                `json:"statusInfo,omitempty" validate:"omitempty"`
	CertificateHashDataChain []types.CertificateHashDataChain `json:"certificateHashData,omitempty" validate:"omitempty,dive"`
}

The field definition of the GetInstalledCertificateIds response payload sent by the Charging Station to the CSMS in response to a GetInstalledCertificateIdsRequest.

func NewGetInstalledCertificateIdsResponse

func NewGetInstalledCertificateIdsResponse(status GetInstalledCertificateStatus) *GetInstalledCertificateIdsResponse

Creates a new NewGetInstalledCertificateIdsResponse, containing all required fields. Additional optional fields may be set afterwards.

func (GetInstalledCertificateIdsResponse) GetFeatureName

func (c GetInstalledCertificateIdsResponse) GetFeatureName() string

type GetInstalledCertificateStatus

type GetInstalledCertificateStatus string

Status returned in response to GetInstalledCertificateIdsRequest, that indicates whether certificate signing has been accepted or rejected.

const (
	GetInstalledCertificateStatusAccepted GetInstalledCertificateStatus = "Accepted" // Normal successful completion (no errors).
	GetInstalledCertificateStatusNotFound GetInstalledCertificateStatus = "NotFound" // Requested resource not found
)

type InstallCertificateFeature

type InstallCertificateFeature struct{}

The CSMS requests the Charging Station to install a new certificate by sending an InstallCertificateRequest. The certificate may be a root CA certificate, a Sub-CA certificate for an eMobility Operator, Charging Station operator, or a V2G root certificate.

The Charging Station responds with an InstallCertificateResponse.

func (InstallCertificateFeature) GetFeatureName

func (f InstallCertificateFeature) GetFeatureName() string

func (InstallCertificateFeature) GetRequestType

func (f InstallCertificateFeature) GetRequestType() reflect.Type

func (InstallCertificateFeature) GetResponseType

func (f InstallCertificateFeature) GetResponseType() reflect.Type

type InstallCertificateRequest

type InstallCertificateRequest struct {
	CertificateType types.CertificateUse `json:"certificateType" validate:"required,certificateUse16"` // Indicates the certificate type that is sent.
	Certificate     string               `json:"certificate" validate:"required,max=5500"`             // A PEM encoded X.509 certificate.
}

The field definition of the InstallCertificate request payload sent by the CSMS to the Charging Station.

func NewInstallCertificateRequest

func NewInstallCertificateRequest(certificateType types.CertificateUse, certificate string) *InstallCertificateRequest

Creates a new InstallCertificateRequest, containing all required fields. There are no optional fields for this message.

func (InstallCertificateRequest) GetFeatureName

func (r InstallCertificateRequest) GetFeatureName() string

type InstallCertificateResponse

type InstallCertificateResponse struct {
	Status     InstallCertificateStatus `json:"status" validate:"required,installCertificateStatus16"`
	StatusInfo *types.StatusInfo        `json:"statusInfo,omitempty" validate:"omitempty"`
}

This field definition of the InstallCertificate response payload, sent by the Charging Station to the CSMS in response to a InstallCertificateRequest. In case the request was invalid, or couldn't be processed, an error will be sent instead.

func NewInstallCertificateResponse

func NewInstallCertificateResponse(status InstallCertificateStatus) *InstallCertificateResponse

Creates a new InstallCertificateResponse, containing all required fields. There are no optional fields for this message.

func (InstallCertificateResponse) GetFeatureName

func (c InstallCertificateResponse) GetFeatureName() string

type InstallCertificateStatus

type InstallCertificateStatus string

Charging Station indicates if installation was successful.

const (
	CertificateStatusAccepted InstallCertificateStatus = "Accepted"
	CertificateStatusRejected InstallCertificateStatus = "Rejected"
	CertificateStatusFailed   InstallCertificateStatus = "Failed"
)

Jump to

Keyboard shortcuts

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