Documentation ¶
Overview ¶
Package store defines the interfaces to the persistent store.
Index ¶
- Constants
- type CertificateInstallationStatus
- type CertificateStore
- type CertificateType
- type ChargeStationAuth
- type ChargeStationAuthStore
- type ChargeStationInstallCertificate
- type ChargeStationInstallCertificates
- type ChargeStationInstallCertificatesStore
- type ChargeStationRuntimeDetails
- type ChargeStationRuntimeDetailsStore
- type ChargeStationSetting
- type ChargeStationSettingStatus
- type ChargeStationSettings
- type ChargeStationSettingsStore
- type ChargeStationTriggerMessage
- type ChargeStationTriggerMessageStore
- type Connector
- type Engine
- type Evse
- type GeoLocation
- type Location
- type LocationStore
- type MeterValue
- type OcpiParty
- type OcpiRegistration
- type OcpiRegistrationStatusType
- type OcpiStore
- type SampledValue
- type SecurityProfile
- type Token
- type TokenStore
- type Transaction
- type TransactionStore
- type TriggerMessage
- type TriggerStatus
- type UnitOfMeasure
Constants ¶
View Source
const ( CacheModeAlways = "ALWAYS" CacheModeAllowed = "ALLOWED" CacheModeAllowedOffline = "ALLOWED_OFFLINE" CacheModeNever = "NEVER" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateInstallationStatus ¶
type CertificateInstallationStatus string
var ( CertificateInstallationPending CertificateInstallationStatus = "Pending" CertificateInstallationAccepted CertificateInstallationStatus = "Accepted" CertificateInstallationRejected CertificateInstallationStatus = "Rejected" )
type CertificateStore ¶
type CertificateType ¶
type CertificateType string
var ( CertificateTypeChargeStation CertificateType = "ChargeStation" CertificateTypeEVCC CertificateType = "EVCC" CertificateTypeV2G CertificateType = "V2G" CertificateTypeMO CertificateType = "MO" CertificateTypeMF CertificateType = "MF" CertificateTypeCSMS CertificateType = "CSMS" )
type ChargeStationAuth ¶
type ChargeStationAuth struct { SecurityProfile SecurityProfile Base64SHA256Password string InvalidUsernameAllowed bool }
type ChargeStationAuthStore ¶
type ChargeStationAuthStore interface { SetChargeStationAuth(ctx context.Context, chargeStationId string, auth *ChargeStationAuth) error LookupChargeStationAuth(ctx context.Context, chargeStationId string) (*ChargeStationAuth, error) }
type ChargeStationInstallCertificate ¶
type ChargeStationInstallCertificate struct { CertificateType CertificateType CertificateId string CertificateData string CertificateInstallationStatus CertificateInstallationStatus SendAfter time.Time }
type ChargeStationInstallCertificates ¶
type ChargeStationInstallCertificates struct { ChargeStationId string Certificates []*ChargeStationInstallCertificate }
type ChargeStationInstallCertificatesStore ¶
type ChargeStationInstallCertificatesStore interface { UpdateChargeStationInstallCertificates(ctx context.Context, chargeStationId string, certificates *ChargeStationInstallCertificates) error LookupChargeStationInstallCertificates(ctx context.Context, chargeStationId string) (*ChargeStationInstallCertificates, error) ListChargeStationInstallCertificates(ctx context.Context, pageSize int, previousChargeStationId string) ([]*ChargeStationInstallCertificates, error) }
type ChargeStationRuntimeDetails ¶
type ChargeStationRuntimeDetails struct {
OcppVersion string
}
type ChargeStationRuntimeDetailsStore ¶
type ChargeStationRuntimeDetailsStore interface { SetChargeStationRuntimeDetails(ctx context.Context, chargeStationId string, details *ChargeStationRuntimeDetails) error LookupChargeStationRuntimeDetails(ctx context.Context, chargeStationId string) (*ChargeStationRuntimeDetails, error) }
type ChargeStationSetting ¶
type ChargeStationSetting struct { Value string Status ChargeStationSettingStatus SendAfter time.Time }
type ChargeStationSettingStatus ¶
type ChargeStationSettingStatus string
var ( ChargeStationSettingStatusPending ChargeStationSettingStatus = "Pending" ChargeStationSettingStatusAccepted ChargeStationSettingStatus = "Accepted" ChargeStationSettingStatusRejected ChargeStationSettingStatus = "Rejected" ChargeStationSettingStatusRebootRequired ChargeStationSettingStatus = "RebootRequired" ChargeStationSettingStatusNotSupported ChargeStationSettingStatus = "NotSupported" )
type ChargeStationSettings ¶
type ChargeStationSettings struct { ChargeStationId string Settings map[string]*ChargeStationSetting }
type ChargeStationSettingsStore ¶
type ChargeStationSettingsStore interface { UpdateChargeStationSettings(ctx context.Context, chargeStationId string, settings *ChargeStationSettings) error LookupChargeStationSettings(ctx context.Context, chargeStationId string) (*ChargeStationSettings, error) ListChargeStationSettings(ctx context.Context, pageSize int, previousChargeStationId string) ([]*ChargeStationSettings, error) DeleteChargeStationSettings(ctx context.Context, chargeStationId string) error }
type ChargeStationTriggerMessage ¶
type ChargeStationTriggerMessage struct { ChargeStationId string TriggerMessage TriggerMessage TriggerStatus TriggerStatus SendAfter time.Time }
type ChargeStationTriggerMessageStore ¶
type ChargeStationTriggerMessageStore interface { SetChargeStationTriggerMessage(ctx context.Context, chargeStationId string, triggerMessage *ChargeStationTriggerMessage) error DeleteChargeStationTriggerMessage(ctx context.Context, chargeStationId string) error LookupChargeStationTriggerMessage(ctx context.Context, chargeStationId string) (*ChargeStationTriggerMessage, error) ListChargeStationTriggerMessages(ctx context.Context, pageSize int, previousChargeStationId string) ([]*ChargeStationTriggerMessage, error) }
type GeoLocation ¶
type LocationStore ¶
type MeterValue ¶
type MeterValue struct { SampledValues []SampledValue `firestore:"sampledValue"` Timestamp string `firestore:"timestamp"` }
type OcpiRegistration ¶
type OcpiRegistration struct {
Status OcpiRegistrationStatusType
}
type OcpiRegistrationStatusType ¶
type OcpiRegistrationStatusType string
var ( OcpiRegistrationStatusRegistered OcpiRegistrationStatusType = "registered" OcpiRegistrationStatusPending OcpiRegistrationStatusType = "pending" )
type OcpiStore ¶
type OcpiStore interface { SetRegistrationDetails(ctx context.Context, token string, registration *OcpiRegistration) error GetRegistrationDetails(ctx context.Context, token string) (*OcpiRegistration, error) DeleteRegistrationDetails(ctx context.Context, token string) error SetPartyDetails(ctx context.Context, partyDetails *OcpiParty) error GetPartyDetails(ctx context.Context, role, countryCode, partyId string) (*OcpiParty, error) ListPartyDetailsForRole(ctx context.Context, role string) ([]*OcpiParty, error) }
type SampledValue ¶
type SecurityProfile ¶
type SecurityProfile int8
const ( UnsecuredTransportWithBasicAuth SecurityProfile = iota TLSWithBasicAuth TLSWithClientSideCertificates )
type TokenStore ¶
type Transaction ¶
type Transaction struct { ChargeStationId string `firestore:"chargeStationId"` TransactionId string `firestore:"transactionId"` IdToken string `firestore:"idToken"` TokenType string `firestore:"tokenType"` MeterValues []MeterValue `firestore:"meterValues"` StartSeqNo int `firestore:"startSeqNo"` EndedSeqNo int `firestore:"endedSeqNo"` UpdatedSeqNoCount int `firestore:"updatedSeqNoCount"` Offline bool `firestore:"offline"` }
type TransactionStore ¶
type TransactionStore interface { Transactions(ctx context.Context) ([]*Transaction, error) FindTransaction(ctx context.Context, chargeStationId, transactionId string) (*Transaction, error) CreateTransaction(ctx context.Context, chargeStationId, transactionId, idToken, tokenType string, meterValue []MeterValue, seqNo int, offline bool) error UpdateTransaction(ctx context.Context, chargeStationId, transactionId string, meterValue []MeterValue) error EndTransaction(ctx context.Context, chargeStationId, transactionId, idToken, tokenType string, meterValue []MeterValue, seqNo int) error }
type TriggerMessage ¶
type TriggerMessage string
var ( TriggerMessageBootNotification TriggerMessage = "BootNotification" TriggerMessageHeartbeat TriggerMessage = "Heartbeat" TriggerMessageStatusNotification TriggerMessage = "StatusNotification" TriggerMessageFirmwareStatusNotification TriggerMessage = "FirmwareStatusNotification" TriggerMessageDiagnosticStatusNotification TriggerMessage = "DiagnosticStatusNotification" TriggerMessageMeterValues TriggerMessage = "MeterValues" TriggerMessageSignChargingStationCertificate TriggerMessage = "SignChargingStationCertificate" TriggerMessageSignV2GCertificate TriggerMessage = "SignV2GCertificate" TriggerMessageSignCombinedCertificate TriggerMessage = "SignCombinedCertificate" TriggerMessagePublishFirmwareStatusNotification TriggerMessage = "PublishFirmwareStatusNotification" )
type TriggerStatus ¶
type TriggerStatus string
var ( TriggerStatusPending TriggerStatus = "Pending" TriggerStatusAccepted TriggerStatus = "Accepted" TriggerStatusRejected TriggerStatus = "Rejected" TriggerStatusNotImplemented TriggerStatus = "NotImplemented" )
type UnitOfMeasure ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package firestore provides an implementation of store.Engine using Google Firestore.
|
Package firestore provides an implementation of store.Engine using Google Firestore. |
Package inmemory provides an in-memory implementation of store.Engine.
|
Package inmemory provides an in-memory implementation of store.Engine. |
Click to show internal directories.
Click to hide internal directories.