transaction

package
v0.0.0-...-65deff2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChargingProfile

type ChargingProfile struct{}

type RemoteStartTransactionConf

type RemoteStartTransactionConf struct {
	Status types.RemoteStartStopStatus `json:"status"`
}

type RemoteStartTransactionReq

type RemoteStartTransactionReq struct {
	ConnectorID     *int32           `json:"connectorId,omitempty"`
	IDTag           string           `json:"idTag"`
	ChargingProfile *ChargingProfile `json:"chargingProfile,omitempty"`
}

func UnmarshalRemoteStartTranformationConf

func UnmarshalRemoteStartTranformationConf(payload interface{}) (*RemoteStartTransactionReq, error)

type RemoteStopTransactionConf

type RemoteStopTransactionConf struct {
	Status types.RemoteStartStopStatus `json:"status"`
}

type RemoteStopTransactionReq

type RemoteStopTransactionReq struct {
	TransactionID int64 `json:"transactionId"`
}

func UnmarshalRemoteStopTranformationConf

func UnmarshalRemoteStopTranformationConf(payload interface{}) (*RemoteStopTransactionReq, error)

type StartTransactionConf

type StartTransactionConf struct {
	IDTagInfo     authorization.IDTagInfo `json:"idTagInfo"`
	TransactionID int64                   `json:"transactionId"`
}

type StartTransactionReq

type StartTransactionReq struct {
	ConnectorID   int32          `json:"connectorId"`
	IDTag         string         `json:"idTag"`
	MeterStart    int32          `json:"meterStart"`
	ReservationID *int64         `json:"reservationId,omitempty"`
	Timestamp     types.OcppTime `json:"timestamp"`
}

func UnmarshalStartTransactionReq

func UnmarshalStartTransactionReq(payload interface{}) (*StartTransactionReq, error)

type StopTransactionConf

type StopTransactionConf struct {
	IDTagInfo *authorization.IDTagInfo `json:"idTagInfo,omitempty"`
}

type StopTransactionReq

type StopTransactionReq struct {
	IDTag           *string                   `json:"idTag,omitempty"`
	MeterStop       int32                     `json:"meterStop"`
	Timestamp       types.OcppTime            `json:"timestamp"`
	TransactionID   int64                     `json:"transactionId"`
	Reason          *db.TransactionStopReason `json:"reason,omitempty"`
	TransactionData []metervalue.MeteredValue `json:"transactionData,omitempty"`
}

func UnmarshalStopTransactionReq

func UnmarshalStopTransactionReq(payload interface{}) (*StopTransactionReq, error)

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(repository *db.Repository, authorization *authorization.Authorization, callService *call.Call, meterValue *metervalue.MeterValue) *Transaction

func (*Transaction) SendRemoteStartTransactionReq

func (s *Transaction) SendRemoteStartTransactionReq(client *ws.Client, connectorId *int32, idTag string, chargingProfile *ChargingProfile) (string, <-chan types.Message, error)

func (*Transaction) SendRemoteStopTransactionReq

func (s *Transaction) SendRemoteStopTransactionReq(client *ws.Client, transactionID int64) (string, <-chan types.Message, error)

func (*Transaction) StartTransactionReq

func (s *Transaction) StartTransactionReq(client *ws.Client, message types.Message)

func (*Transaction) StopTransactionReq

func (s *Transaction) StopTransactionReq(client *ws.Client, message types.Message)

Jump to

Keyboard shortcuts

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