accounting

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

gNMI Accounting Protocol

Objective

This proto definition serves to describe a method of transfering accounting records from a network device (or other system) to a streaming telemetry collection system, primarily over a gNMI transport connection.

Method of Operation

Accounting Records are available at a gNMI origin: gnmi.accounting

Records will be streamed to the receiver as individual Record messages as they are defined in the gnsi.accounting protocol buffer definition.

Each Record() message contains a timestamp element, this represents the time at which the accounted event occured, local to the device which sends the message.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AuthDetail_AuthenStatus_name = map[int32]string{
		0: "AUTHEN_STATUS_UNSPECIFIED",
		1: "AUTHEN_STATUS_PERMIT",
		2: "AUTHEN_STATUS_DENY",
	}
	AuthDetail_AuthenStatus_value = map[string]int32{
		"AUTHEN_STATUS_UNSPECIFIED": 0,
		"AUTHEN_STATUS_PERMIT":      1,
		"AUTHEN_STATUS_DENY":        2,
	}
)

Enum value maps for AuthDetail_AuthenStatus.

View Source
var (
	CommandService_CmdServiceType_name = map[int32]string{
		0: "CMD_SERVICE_TYPE_UNSPECIFIED",
		1: "CMD_SERVICE_TYPE_SHELL",
		2: "CMD_SERVICE_TYPE_CLI",
	}
	CommandService_CmdServiceType_value = map[string]int32{
		"CMD_SERVICE_TYPE_UNSPECIFIED": 0,
		"CMD_SERVICE_TYPE_SHELL":       1,
		"CMD_SERVICE_TYPE_CLI":         2,
	}
)

Enum value maps for CommandService_CmdServiceType.

View Source
var (
	GrpcService_GrpcServiceType_name = map[int32]string{
		0: "GRPC_SERVICE_TYPE_UNSPECIFIED",
		1: "GRPC_SERVICE_TYPE_GNMI",
		2: "GRPC_SERVICE_TYPE_GNOI",
		3: "GRPC_SERVICE_TYPE_GNSI",
		4: "GRPC_SERVICE_TYPE_GRIBI",
	}
	GrpcService_GrpcServiceType_value = map[string]int32{
		"GRPC_SERVICE_TYPE_UNSPECIFIED": 0,
		"GRPC_SERVICE_TYPE_GNMI":        1,
		"GRPC_SERVICE_TYPE_GNOI":        2,
		"GRPC_SERVICE_TYPE_GNSI":        3,
		"GRPC_SERVICE_TYPE_GRIBI":       4,
	}
)

Enum value maps for GrpcService_GrpcServiceType.

View Source
var (
	Record_ServiceStatus_name = map[int32]string{
		0: "SERVICE_STATUS_UNSPECIFIED",
		1: "SERVICE_STATUS_SUCCESS",
		2: "SERVICE_STATUS_FAILURE",
	}
	Record_ServiceStatus_value = map[string]int32{
		"SERVICE_STATUS_UNSPECIFIED": 0,
		"SERVICE_STATUS_SUCCESS":     1,
		"SERVICE_STATUS_FAILURE":     2,
	}
)

Enum value maps for Record_ServiceStatus.

View Source
var File_github_com_openconfig_gnsi_accounting_acct_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AuthDetail

type AuthDetail struct {
	Identity       string                  `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	PrivilegeLevel uint32                  `protobuf:"varint,2,opt,name=privilege_level,json=privilegeLevel,proto3" json:"privilege_level,omitempty"`
	Status         AuthDetail_AuthenStatus `protobuf:"varint,3,opt,name=status,proto3,enum=gnsi.accounting.AuthDetail_AuthenStatus" json:"status,omitempty"`
	DenyCause      string                  `protobuf:"bytes,4,opt,name=deny_cause,json=denyCause,proto3" json:"deny_cause,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthDetail) Descriptor deprecated

func (*AuthDetail) Descriptor() ([]byte, []int)

Deprecated: Use AuthDetail.ProtoReflect.Descriptor instead.

func (*AuthDetail) GetDenyCause

func (x *AuthDetail) GetDenyCause() string

func (*AuthDetail) GetIdentity

func (x *AuthDetail) GetIdentity() string

func (*AuthDetail) GetPrivilegeLevel

func (x *AuthDetail) GetPrivilegeLevel() uint32

func (*AuthDetail) GetStatus

func (x *AuthDetail) GetStatus() AuthDetail_AuthenStatus

func (*AuthDetail) ProtoMessage

func (*AuthDetail) ProtoMessage()

func (*AuthDetail) ProtoReflect

func (x *AuthDetail) ProtoReflect() protoreflect.Message

func (*AuthDetail) Reset

func (x *AuthDetail) Reset()

func (*AuthDetail) String

func (x *AuthDetail) String() string

type AuthDetail_AuthenStatus

type AuthDetail_AuthenStatus int32
const (
	AuthDetail_AUTHEN_STATUS_UNSPECIFIED AuthDetail_AuthenStatus = 0
	AuthDetail_AUTHEN_STATUS_PERMIT      AuthDetail_AuthenStatus = 1
	AuthDetail_AUTHEN_STATUS_DENY        AuthDetail_AuthenStatus = 2
)

func (AuthDetail_AuthenStatus) Descriptor

func (AuthDetail_AuthenStatus) Enum

func (AuthDetail_AuthenStatus) EnumDescriptor deprecated

func (AuthDetail_AuthenStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use AuthDetail_AuthenStatus.Descriptor instead.

func (AuthDetail_AuthenStatus) Number

func (AuthDetail_AuthenStatus) String

func (x AuthDetail_AuthenStatus) String() string

func (AuthDetail_AuthenStatus) Type

type CommandService

type CommandService struct {
	ServiceType CommandService_CmdServiceType `` /* 146-byte string literal not displayed */
	Cmd         string                        `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"`
	CmdArgs     []string                      `protobuf:"bytes,3,rep,name=cmd_args,json=cmdArgs,proto3" json:"cmd_args,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandService) Descriptor deprecated

func (*CommandService) Descriptor() ([]byte, []int)

Deprecated: Use CommandService.ProtoReflect.Descriptor instead.

func (*CommandService) GetCmd

func (x *CommandService) GetCmd() string

func (*CommandService) GetCmdArgs

func (x *CommandService) GetCmdArgs() []string

func (*CommandService) GetServiceType

func (x *CommandService) GetServiceType() CommandService_CmdServiceType

func (*CommandService) ProtoMessage

func (*CommandService) ProtoMessage()

func (*CommandService) ProtoReflect

func (x *CommandService) ProtoReflect() protoreflect.Message

func (*CommandService) Reset

func (x *CommandService) Reset()

func (*CommandService) String

func (x *CommandService) String() string

type CommandService_CmdServiceType

type CommandService_CmdServiceType int32
const (
	CommandService_CMD_SERVICE_TYPE_UNSPECIFIED CommandService_CmdServiceType = 0
	CommandService_CMD_SERVICE_TYPE_SHELL       CommandService_CmdServiceType = 1
	CommandService_CMD_SERVICE_TYPE_CLI         CommandService_CmdServiceType = 2
)

func (CommandService_CmdServiceType) Descriptor

func (CommandService_CmdServiceType) Enum

func (CommandService_CmdServiceType) EnumDescriptor deprecated

func (CommandService_CmdServiceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use CommandService_CmdServiceType.Descriptor instead.

func (CommandService_CmdServiceType) Number

func (CommandService_CmdServiceType) String

func (CommandService_CmdServiceType) Type

type GrpcService

type GrpcService struct {
	ServiceType    GrpcService_GrpcServiceType `` /* 144-byte string literal not displayed */
	RpcName        string                      `protobuf:"bytes,2,opt,name=rpc_name,json=rpcName,proto3" json:"rpc_name,omitempty"`
	Payloads       []*anypb.Any                `protobuf:"bytes,3,rep,name=payloads,proto3" json:"payloads,omitempty"`
	ConfigMetadata string                      `protobuf:"bytes,4,opt,name=config_metadata,json=configMetadata,proto3" json:"config_metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*GrpcService) Descriptor deprecated

func (*GrpcService) Descriptor() ([]byte, []int)

Deprecated: Use GrpcService.ProtoReflect.Descriptor instead.

func (*GrpcService) GetConfigMetadata

func (x *GrpcService) GetConfigMetadata() string

func (*GrpcService) GetPayloads

func (x *GrpcService) GetPayloads() []*anypb.Any

func (*GrpcService) GetRpcName

func (x *GrpcService) GetRpcName() string

func (*GrpcService) GetServiceType

func (x *GrpcService) GetServiceType() GrpcService_GrpcServiceType

func (*GrpcService) ProtoMessage

func (*GrpcService) ProtoMessage()

func (*GrpcService) ProtoReflect

func (x *GrpcService) ProtoReflect() protoreflect.Message

func (*GrpcService) Reset

func (x *GrpcService) Reset()

func (*GrpcService) String

func (x *GrpcService) String() string

type GrpcService_GrpcServiceType

type GrpcService_GrpcServiceType int32
const (
	GrpcService_GRPC_SERVICE_TYPE_UNSPECIFIED GrpcService_GrpcServiceType = 0
	GrpcService_GRPC_SERVICE_TYPE_GNMI        GrpcService_GrpcServiceType = 1
	GrpcService_GRPC_SERVICE_TYPE_GNOI        GrpcService_GrpcServiceType = 2
	GrpcService_GRPC_SERVICE_TYPE_GNSI        GrpcService_GrpcServiceType = 3
	GrpcService_GRPC_SERVICE_TYPE_GRIBI       GrpcService_GrpcServiceType = 4
)

func (GrpcService_GrpcServiceType) Descriptor

func (GrpcService_GrpcServiceType) Enum

func (GrpcService_GrpcServiceType) EnumDescriptor deprecated

func (GrpcService_GrpcServiceType) EnumDescriptor() ([]byte, []int)

Deprecated: Use GrpcService_GrpcServiceType.Descriptor instead.

func (GrpcService_GrpcServiceType) Number

func (GrpcService_GrpcServiceType) String

func (GrpcService_GrpcServiceType) Type

type Record

type Record struct {
	SessionInfo *SessionInfo           `protobuf:"bytes,1,opt,name=session_info,json=sessionInfo,proto3" json:"session_info,omitempty"`
	Timestamp   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Types that are assignable to ServiceRequest:
	//	*Record_CmdService
	//	*Record_GrpcService
	ServiceRequest isRecord_ServiceRequest `protobuf_oneof:"service_request"`
	Status         Record_ServiceStatus    `protobuf:"varint,5,opt,name=status,proto3,enum=gnsi.accounting.Record_ServiceStatus" json:"status,omitempty"`
	FailureCause   string                  `protobuf:"bytes,6,opt,name=failure_cause,json=failureCause,proto3" json:"failure_cause,omitempty"`
	Authen         *AuthDetail             `protobuf:"bytes,7,opt,name=authen,proto3" json:"authen,omitempty"`
	TaskIds        []string                `protobuf:"bytes,32,rep,name=task_ids,json=taskIds,proto3" json:"task_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*Record) Descriptor deprecated

func (*Record) Descriptor() ([]byte, []int)

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetAuthen

func (x *Record) GetAuthen() *AuthDetail

func (*Record) GetCmdService

func (x *Record) GetCmdService() *CommandService

func (*Record) GetFailureCause

func (x *Record) GetFailureCause() string

func (*Record) GetGrpcService

func (x *Record) GetGrpcService() *GrpcService

func (*Record) GetServiceRequest

func (m *Record) GetServiceRequest() isRecord_ServiceRequest

func (*Record) GetSessionInfo

func (x *Record) GetSessionInfo() *SessionInfo

func (*Record) GetStatus

func (x *Record) GetStatus() Record_ServiceStatus

func (*Record) GetTaskIds

func (x *Record) GetTaskIds() []string

func (*Record) GetTimestamp

func (x *Record) GetTimestamp() *timestamppb.Timestamp

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) ProtoReflect

func (x *Record) ProtoReflect() protoreflect.Message

func (*Record) Reset

func (x *Record) Reset()

func (*Record) String

func (x *Record) String() string

type Record_CmdService

type Record_CmdService struct {
	CmdService *CommandService `protobuf:"bytes,3,opt,name=cmd_service,json=cmdService,proto3,oneof"`
}

type Record_GrpcService

type Record_GrpcService struct {
	GrpcService *GrpcService `protobuf:"bytes,4,opt,name=grpc_service,json=grpcService,proto3,oneof"`
}

type Record_ServiceStatus

type Record_ServiceStatus int32
const (
	Record_SERVICE_STATUS_UNSPECIFIED Record_ServiceStatus = 0
	Record_SERVICE_STATUS_SUCCESS     Record_ServiceStatus = 1
	Record_SERVICE_STATUS_FAILURE     Record_ServiceStatus = 2
)

func (Record_ServiceStatus) Descriptor

func (Record_ServiceStatus) Enum

func (Record_ServiceStatus) EnumDescriptor deprecated

func (Record_ServiceStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use Record_ServiceStatus.Descriptor instead.

func (Record_ServiceStatus) Number

func (Record_ServiceStatus) String

func (x Record_ServiceStatus) String() string

func (Record_ServiceStatus) Type

type SessionInfo

type SessionInfo struct {
	SystemAddress string `protobuf:"bytes,1,opt,name=system_address,json=systemAddress,proto3" json:"system_address,omitempty"`
	Layer4Proto   uint32 `protobuf:"varint,2,opt,name=layer4_proto,json=layer4Proto,proto3" json:"layer4_proto,omitempty"`
	LocalPort     uint32 `protobuf:"varint,3,opt,name=local_port,json=localPort,proto3" json:"local_port,omitempty"`
	RemoteAddress string `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3" json:"remote_address,omitempty"`
	RemotePort    uint32 `protobuf:"varint,5,opt,name=remote_port,json=remotePort,proto3" json:"remote_port,omitempty"`
	ChannelId     string `protobuf:"bytes,6,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionInfo) Descriptor deprecated

func (*SessionInfo) Descriptor() ([]byte, []int)

Deprecated: Use SessionInfo.ProtoReflect.Descriptor instead.

func (*SessionInfo) GetChannelId

func (x *SessionInfo) GetChannelId() string

func (*SessionInfo) GetLayer4Proto

func (x *SessionInfo) GetLayer4Proto() uint32

func (*SessionInfo) GetLocalPort

func (x *SessionInfo) GetLocalPort() uint32

func (*SessionInfo) GetRemoteAddress

func (x *SessionInfo) GetRemoteAddress() string

func (*SessionInfo) GetRemotePort

func (x *SessionInfo) GetRemotePort() uint32

func (*SessionInfo) GetSystemAddress

func (x *SessionInfo) GetSystemAddress() string

func (*SessionInfo) ProtoMessage

func (*SessionInfo) ProtoMessage()

func (*SessionInfo) ProtoReflect

func (x *SessionInfo) ProtoReflect() protoreflect.Message

func (*SessionInfo) Reset

func (x *SessionInfo) Reset()

func (*SessionInfo) String

func (x *SessionInfo) String() string

Jump to

Keyboard shortcuts

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