Documentation ¶
Overview ¶
package protos provides proto definitions of basic accounting service
Index ¶
- func RegisterAccountingServer(s *grpc.Server, srv AccountingServer)
- type AccountingClient
- type AccountingServer
- type QoS
- func (*QoS) Descriptor() ([]byte, []int)
- func (m *QoS) GetDownloadMbps() float32
- func (m *QoS) GetUploadMbps() float32
- func (*QoS) ProtoMessage()
- func (m *QoS) Reset()
- func (m *QoS) String() string
- func (m *QoS) XXX_DiscardUnknown()
- func (m *QoS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QoS) XXX_Merge(src proto.Message)
- func (m *QoS) XXX_Size() int
- func (m *QoS) XXX_Unmarshal(b []byte) error
- type Session
- func (*Session) Descriptor() ([]byte, []int)
- func (m *Session) GetAvailableQos() *QoS
- func (m *Session) GetCertificateSerialNumber() []byte
- func (m *Session) GetConsumerId() string
- func (m *Session) GetHardwareAddr() []byte
- func (m *Session) GetIMSI() string
- func (m *Session) GetName() string
- func (m *Session) GetProviderApn() string
- func (m *Session) GetProviderGatewayId() string
- func (m *Session) GetProviderId() string
- func (m *Session) GetSessionId() string
- func (m *Session) GetUser() isSession_User
- func (*Session) ProtoMessage()
- func (m *Session) Reset()
- func (m *Session) String() string
- func (m *Session) XXX_DiscardUnknown()
- func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Session) XXX_Merge(src proto.Message)
- func (*Session) XXX_OneofWrappers() []interface{}
- func (m *Session) XXX_Size() int
- func (m *Session) XXX_Unmarshal(b []byte) error
- type SessionResp
- func (*SessionResp) Descriptor() ([]byte, []int)
- func (m *SessionResp) GetMinAcceptableQos() *QoS
- func (m *SessionResp) GetReportingAdvisory() *SessionRespReportLimits
- func (*SessionResp) ProtoMessage()
- func (m *SessionResp) Reset()
- func (m *SessionResp) String() string
- func (m *SessionResp) XXX_DiscardUnknown()
- func (m *SessionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionResp) XXX_Merge(src proto.Message)
- func (m *SessionResp) XXX_Size() int
- func (m *SessionResp) XXX_Unmarshal(b []byte) error
- type SessionRespReportLimits
- func (*SessionRespReportLimits) Descriptor() ([]byte, []int)
- func (m *SessionRespReportLimits) GetElapsedTimeSec() uint32
- func (m *SessionRespReportLimits) GetOctetsIn() uint64
- func (m *SessionRespReportLimits) GetOctetsOut() uint64
- func (*SessionRespReportLimits) ProtoMessage()
- func (m *SessionRespReportLimits) Reset()
- func (m *SessionRespReportLimits) String() string
- func (m *SessionRespReportLimits) XXX_DiscardUnknown()
- func (m *SessionRespReportLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SessionRespReportLimits) XXX_Merge(src proto.Message)
- func (m *SessionRespReportLimits) XXX_Size() int
- func (m *SessionRespReportLimits) XXX_Unmarshal(b []byte) error
- type Session_CertificateSerialNumber
- type Session_HardwareAddr
- type Session_IMSI
- type Session_Name
- type StopResp
- func (*StopResp) Descriptor() ([]byte, []int)
- func (*StopResp) ProtoMessage()
- func (m *StopResp) Reset()
- func (m *StopResp) String() string
- func (m *StopResp) XXX_DiscardUnknown()
- func (m *StopResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StopResp) XXX_Merge(src proto.Message)
- func (m *StopResp) XXX_Size() int
- func (m *StopResp) XXX_Unmarshal(b []byte) error
- type UnimplementedAccountingServer
- func (*UnimplementedAccountingServer) Start(ctx context.Context, req *Session) (*SessionResp, error)
- func (*UnimplementedAccountingServer) Stop(ctx context.Context, req *UpdateReq) (*StopResp, error)
- func (*UnimplementedAccountingServer) Update(ctx context.Context, req *UpdateReq) (*SessionResp, error)
- type UpdateReq
- func (*UpdateReq) Descriptor() ([]byte, []int)
- func (m *UpdateReq) GetOctetsIn() uint64
- func (m *UpdateReq) GetOctetsOut() uint64
- func (m *UpdateReq) GetSession() *Session
- func (m *UpdateReq) GetSessionTime() uint32
- func (*UpdateReq) ProtoMessage()
- func (m *UpdateReq) Reset()
- func (m *UpdateReq) String() string
- func (m *UpdateReq) XXX_DiscardUnknown()
- func (m *UpdateReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UpdateReq) XXX_Merge(src proto.Message)
- func (m *UpdateReq) XXX_Size() int
- func (m *UpdateReq) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccountingServer ¶
func RegisterAccountingServer(s *grpc.Server, srv AccountingServer)
Types ¶
type AccountingClient ¶
type AccountingClient interface { // start will be called at the end of every new user session creation // start is responsible for verification & initiation of a smart contract // between the user identity provider/MNO and service provider (ISP/WISP/PLTE) // A non-error return will indicate successful contract establishment and will // result in the beginning of service for the user Start(ctx context.Context, in *Session, opts ...grpc.CallOption) (*SessionResp, error) // update should be continuously called for every ongoing service session to update // the user bandwidth usage as well as current quality of provided service. // If update returns error the session should be terminated and the user disconnected, // In the case of unsuccessful update completion, service provider is spouse to follow up // with final stop call Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*SessionResp, error) // stop is a notification call to communicate to identity provider // user/network initiated service termination. // stop will provide final used bandwidth count. stop call is issued // after the user session was terminated. Stop(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*StopResp, error) }
AccountingClient is the client API for Accounting service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAccountingClient ¶
func NewAccountingClient(cc grpc.ClientConnInterface) AccountingClient
type AccountingServer ¶
type AccountingServer interface { // start will be called at the end of every new user session creation // start is responsible for verification & initiation of a smart contract // between the user identity provider/MNO and service provider (ISP/WISP/PLTE) // A non-error return will indicate successful contract establishment and will // result in the beginning of service for the user Start(context.Context, *Session) (*SessionResp, error) // update should be continuously called for every ongoing service session to update // the user bandwidth usage as well as current quality of provided service. // If update returns error the session should be terminated and the user disconnected, // In the case of unsuccessful update completion, service provider is spouse to follow up // with final stop call Update(context.Context, *UpdateReq) (*SessionResp, error) // stop is a notification call to communicate to identity provider // user/network initiated service termination. // stop will provide final used bandwidth count. stop call is issued // after the user session was terminated. Stop(context.Context, *UpdateReq) (*StopResp, error) }
AccountingServer is the server API for Accounting service.
type QoS ¶
type QoS struct { DownloadMbps float32 `protobuf:"fixed32,1,opt,name=download_mbps,json=downloadMbps,proto3" json:"download_mbps,omitempty"` UploadMbps float32 `protobuf:"fixed32,2,opt,name=upload_mbps,json=uploadMbps,proto3" json:"upload_mbps,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Quality Of Service data
func (*QoS) Descriptor ¶
func (*QoS) GetDownloadMbps ¶
func (*QoS) GetUploadMbps ¶
func (*QoS) ProtoMessage ¶
func (*QoS) ProtoMessage()
func (*QoS) XXX_DiscardUnknown ¶
func (m *QoS) XXX_DiscardUnknown()
func (*QoS) XXX_Unmarshal ¶
type Session ¶
type Session struct { // user identity // // Types that are valid to be assigned to User: // *Session_IMSI // *Session_CertificateSerialNumber // *Session_HardwareAddr // *Session_Name User isSession_User `protobuf_oneof:"user"` // ID of the user network (MNO, Identity Provider, etc. - user network ID) ConsumerId string `protobuf:"bytes,5,opt,name=consumer_id,json=consumerId,proto3" json:"consumer_id,omitempty"` // unique session ID SessionId string `protobuf:"bytes,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // ID of the service provider network (serving network ID) ProviderId string `protobuf:"bytes,7,opt,name=provider_id,json=providerId,proto3" json:"provider_id,omitempty"` // ID/Name of the serving provider Access Point (WiFi AP, LTE enodeb, etc.) - optional ProviderApn string `protobuf:"bytes,8,opt,name=provider_apn,json=providerApn,proto3" json:"provider_apn,omitempty"` // ID of the service provider gateway (AGW, CWAG, etc.) - optional // Note: this is the ID of Magma access gateway, multiple APs/enodebs may be connected to a single access gateway ProviderGatewayId string `protobuf:"bytes,9,opt,name=provider_gateway_id,json=providerGatewayId,proto3" json:"provider_gateway_id,omitempty"` // available QoS at the caller's site (optional - can be ignored by SC) AvailableQos *QoS `protobuf:"bytes,10,opt,name=available_qos,json=availableQos,proto3" json:"available_qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
user session descriptor
func (*Session) Descriptor ¶
func (*Session) GetAvailableQos ¶
func (*Session) GetCertificateSerialNumber ¶
func (*Session) GetConsumerId ¶
func (*Session) GetHardwareAddr ¶
func (*Session) GetProviderApn ¶
func (*Session) GetProviderGatewayId ¶
func (*Session) GetProviderId ¶
func (*Session) GetSessionId ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) XXX_DiscardUnknown ¶
func (m *Session) XXX_DiscardUnknown()
func (*Session) XXX_Marshal ¶
func (*Session) XXX_OneofWrappers ¶
func (*Session) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Session) XXX_Unmarshal ¶
type SessionResp ¶
type SessionResp struct { ReportingAdvisory *SessionRespReportLimits `protobuf:"bytes,1,opt,name=reporting_advisory,json=reportingAdvisory,proto3" json:"reporting_advisory,omitempty"` // minimal required QoS, the session has to be terminated if service provider's site // cannot guarantee the requested QoS (optional) MinAcceptableQos *QoS `protobuf:"bytes,2,opt,name=min_acceptable_qos,json=minAcceptableQos,proto3" json:"min_acceptable_qos,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
start session response
func (*SessionResp) Descriptor ¶
func (*SessionResp) Descriptor() ([]byte, []int)
func (*SessionResp) GetMinAcceptableQos ¶
func (m *SessionResp) GetMinAcceptableQos() *QoS
func (*SessionResp) GetReportingAdvisory ¶
func (m *SessionResp) GetReportingAdvisory() *SessionRespReportLimits
func (*SessionResp) ProtoMessage ¶
func (*SessionResp) ProtoMessage()
func (*SessionResp) Reset ¶
func (m *SessionResp) Reset()
func (*SessionResp) String ¶
func (m *SessionResp) String() string
func (*SessionResp) XXX_DiscardUnknown ¶
func (m *SessionResp) XXX_DiscardUnknown()
func (*SessionResp) XXX_Marshal ¶
func (m *SessionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionResp) XXX_Merge ¶
func (m *SessionResp) XXX_Merge(src proto.Message)
func (*SessionResp) XXX_Size ¶
func (m *SessionResp) XXX_Size() int
func (*SessionResp) XXX_Unmarshal ¶
func (m *SessionResp) XXX_Unmarshal(b []byte) error
type SessionRespReportLimits ¶
type SessionRespReportLimits struct { // octets_in - trigger update when RX bytes were consumed by the user from the last update event // default is 0, no RX trigger OctetsIn uint64 `protobuf:"varint,1,opt,name=octets_in,json=octetsIn,proto3" json:"octets_in,omitempty"` // octets_out - trigger update when TX bytes were consumed by the user from the last update event // default is 0, no TX trigger OctetsOut uint64 `protobuf:"varint,2,opt,name=octets_out,json=octetsOut,proto3" json:"octets_out,omitempty"` // elapsed_time_sec - trigger update when elapsed_time_sec seconds passed from the last update event ElapsedTimeSec uint32 `protobuf:"varint,3,opt,name=elapsed_time_sec,json=elapsedTimeSec,proto3" json:"elapsed_time_sec,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
optional update triggers user identity provider will use report_limits to express its update frequency preferences. Service provider is encouraged, but not required to comply with specified reporting preferences
func (*SessionRespReportLimits) Descriptor ¶
func (*SessionRespReportLimits) Descriptor() ([]byte, []int)
func (*SessionRespReportLimits) GetElapsedTimeSec ¶
func (m *SessionRespReportLimits) GetElapsedTimeSec() uint32
func (*SessionRespReportLimits) GetOctetsIn ¶
func (m *SessionRespReportLimits) GetOctetsIn() uint64
func (*SessionRespReportLimits) GetOctetsOut ¶
func (m *SessionRespReportLimits) GetOctetsOut() uint64
func (*SessionRespReportLimits) ProtoMessage ¶
func (*SessionRespReportLimits) ProtoMessage()
func (*SessionRespReportLimits) Reset ¶
func (m *SessionRespReportLimits) Reset()
func (*SessionRespReportLimits) String ¶
func (m *SessionRespReportLimits) String() string
func (*SessionRespReportLimits) XXX_DiscardUnknown ¶
func (m *SessionRespReportLimits) XXX_DiscardUnknown()
func (*SessionRespReportLimits) XXX_Marshal ¶
func (m *SessionRespReportLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SessionRespReportLimits) XXX_Merge ¶
func (m *SessionRespReportLimits) XXX_Merge(src proto.Message)
func (*SessionRespReportLimits) XXX_Size ¶
func (m *SessionRespReportLimits) XXX_Size() int
func (*SessionRespReportLimits) XXX_Unmarshal ¶
func (m *SessionRespReportLimits) XXX_Unmarshal(b []byte) error
type Session_CertificateSerialNumber ¶
type Session_CertificateSerialNumber struct {
CertificateSerialNumber []byte `protobuf:"bytes,2,opt,name=certificate_serial_number,json=certificateSerialNumber,proto3,oneof"`
}
type Session_HardwareAddr ¶
type Session_HardwareAddr struct {
HardwareAddr []byte `protobuf:"bytes,3,opt,name=hardware_addr,json=hardwareAddr,proto3,oneof"`
}
type Session_IMSI ¶
type Session_IMSI struct {
IMSI string `protobuf:"bytes,1,opt,name=IMSI,proto3,oneof"`
}
type Session_Name ¶
type Session_Name struct {
Name string `protobuf:"bytes,4,opt,name=name,proto3,oneof"`
}
type StopResp ¶
type StopResp struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StopResp) Descriptor ¶
func (*StopResp) ProtoMessage ¶
func (*StopResp) ProtoMessage()
func (*StopResp) XXX_DiscardUnknown ¶
func (m *StopResp) XXX_DiscardUnknown()
func (*StopResp) XXX_Marshal ¶
func (*StopResp) XXX_Unmarshal ¶
type UnimplementedAccountingServer ¶
type UnimplementedAccountingServer struct { }
UnimplementedAccountingServer can be embedded to have forward compatible implementations.
func (*UnimplementedAccountingServer) Start ¶
func (*UnimplementedAccountingServer) Start(ctx context.Context, req *Session) (*SessionResp, error)
func (*UnimplementedAccountingServer) Update ¶
func (*UnimplementedAccountingServer) Update(ctx context.Context, req *UpdateReq) (*SessionResp, error)
type UpdateReq ¶
type UpdateReq struct { // ongoing session information Session *Session `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // octets_in indicates how many octets have been received by the user // from the service provider over the course of this session (accumulative) // The accumulative nature of this field should compensate for intermittent // losses of connectivity OctetsIn uint64 `protobuf:"varint,2,opt,name=octets_in,json=octetsIn,proto3" json:"octets_in,omitempty"` // octets_out indicates how many octets have been sent on behalf of the user // by the service provider over the course of this session (accumulative) // The accumulative nature of this field should compensate for intermittent // losses of connectivity OctetsOut uint64 `protobuf:"varint,3,opt,name=octets_out,json=octetsOut,proto3" json:"octets_out,omitempty"` // session_time indicates how many seconds the user/session has received service for SessionTime uint32 `protobuf:"varint,4,opt,name=session_time,json=sessionTime,proto3" json:"session_time,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
update_req is relying information on user's ongoing session consumption
func (*UpdateReq) Descriptor ¶
func (*UpdateReq) GetOctetsIn ¶
func (*UpdateReq) GetOctetsOut ¶
func (*UpdateReq) GetSession ¶
func (*UpdateReq) GetSessionTime ¶
func (*UpdateReq) ProtoMessage ¶
func (*UpdateReq) ProtoMessage()
func (*UpdateReq) XXX_DiscardUnknown ¶
func (m *UpdateReq) XXX_DiscardUnknown()