msgprotov2

package
v0.0.0-...-099471b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnumNamesACLCommand = map[ACLCommand]string{
	ACLCommandLIST:   "LIST",
	ACLCommandPERMIT: "PERMIT",
	ACLCommandREVOKE: "REVOKE",
}
View Source
var EnumNamesErrType = map[ErrType]string{
	ErrTypeErrConnection: "ErrConnection",
	ErrTypeErrBadRequest: "ErrBadRequest",
	ErrTypeErrInternal:   "ErrInternal",
	ErrTypeErrMessage:    "ErrMessage",
	ErrTypeErrAuth:       "ErrAuth",
	ErrTypeErrACL:        "ErrACL",
}
View Source
var EnumNamesMsgSubType = map[MsgSubType]string{
	MsgSubTypeUnknown:                    "Unknown",
	MsgSubTypeAuthenticationReq:          "AuthenticationReq",
	MsgSubTypeAuthenticationResp:         "AuthenticationResp",
	MsgSubTypeAuthenticationQRResp:       "AuthenticationQRResp",
	MsgSubTypeAuthenticationDeepLinkResp: "AuthenticationDeepLinkResp",
	MsgSubTypeFactReq:                    "FactReq",
	MsgSubTypeFactResp:                   "FactResp",
	MsgSubTypeFactQRResp:                 "FactQRResp",
	MsgSubTypeFactDeepLinkResp:           "FactDeepLinkResp",
	MsgSubTypeEmailSecurityCodeReq:       "EmailSecurityCodeReq",
	MsgSubTypeEmailSecurityCodeResp:      "EmailSecurityCodeResp",
	MsgSubTypePhoneSecurityCodeReq:       "PhoneSecurityCodeReq",
	MsgSubTypePhoneSecurityCodeResp:      "PhoneSecurityCodeResp",
	MsgSubTypePhoneVerificationReq:       "PhoneVerificationReq",
	MsgSubTypePhoneVerificationResp:      "PhoneVerificationResp",
	MsgSubTypeEmailVerificationReq:       "EmailVerificationReq",
	MsgSubTypeEmailVerificationResp:      "EmailVerificationResp",
	MsgSubTypeDocumentVerificationReq:    "DocumentVerificationReq",
	MsgSubTypeDocumentVerificationResp:   "DocumentVerificationResp",
}
View Source
var EnumNamesMsgType = map[MsgType]string{
	MsgTypeMSG:  "MSG",
	MsgTypeACK:  "ACK",
	MsgTypeERR:  "ERR",
	MsgTypeAUTH: "AUTH",
	MsgTypeACL:  "ACL",
}
View Source
var EnumValuesACLCommand = map[string]ACLCommand{
	"LIST":   ACLCommandLIST,
	"PERMIT": ACLCommandPERMIT,
	"REVOKE": ACLCommandREVOKE,
}
View Source
var EnumValuesErrType = map[string]ErrType{
	"ErrConnection": ErrTypeErrConnection,
	"ErrBadRequest": ErrTypeErrBadRequest,
	"ErrInternal":   ErrTypeErrInternal,
	"ErrMessage":    ErrTypeErrMessage,
	"ErrAuth":       ErrTypeErrAuth,
	"ErrACL":        ErrTypeErrACL,
}
View Source
var EnumValuesMsgSubType = map[string]MsgSubType{
	"Unknown":                    MsgSubTypeUnknown,
	"AuthenticationReq":          MsgSubTypeAuthenticationReq,
	"AuthenticationResp":         MsgSubTypeAuthenticationResp,
	"AuthenticationQRResp":       MsgSubTypeAuthenticationQRResp,
	"AuthenticationDeepLinkResp": MsgSubTypeAuthenticationDeepLinkResp,
	"FactReq":                    MsgSubTypeFactReq,
	"FactResp":                   MsgSubTypeFactResp,
	"FactQRResp":                 MsgSubTypeFactQRResp,
	"FactDeepLinkResp":           MsgSubTypeFactDeepLinkResp,
	"EmailSecurityCodeReq":       MsgSubTypeEmailSecurityCodeReq,
	"EmailSecurityCodeResp":      MsgSubTypeEmailSecurityCodeResp,
	"PhoneSecurityCodeReq":       MsgSubTypePhoneSecurityCodeReq,
	"PhoneSecurityCodeResp":      MsgSubTypePhoneSecurityCodeResp,
	"PhoneVerificationReq":       MsgSubTypePhoneVerificationReq,
	"PhoneVerificationResp":      MsgSubTypePhoneVerificationResp,
	"EmailVerificationReq":       MsgSubTypeEmailVerificationReq,
	"EmailVerificationResp":      MsgSubTypeEmailVerificationResp,
	"DocumentVerificationReq":    MsgSubTypeDocumentVerificationReq,
	"DocumentVerificationResp":   MsgSubTypeDocumentVerificationResp,
}
View Source
var EnumValuesMsgType = map[string]MsgType{
	"MSG":  MsgTypeMSG,
	"ACK":  MsgTypeACK,
	"ERR":  MsgTypeERR,
	"AUTH": MsgTypeAUTH,
	"ACL":  MsgTypeACL,
}

Functions

func ACLAddCommand

func ACLAddCommand(builder *flatbuffers.Builder, command ACLCommand)

func ACLAddId

func ACLAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func ACLAddMsgtype

func ACLAddMsgtype(builder *flatbuffers.Builder, msgtype MsgType)

func ACLAddPayload

func ACLAddPayload(builder *flatbuffers.Builder, payload flatbuffers.UOffsetT)

func ACLEnd

func ACLEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func ACLStart

func ACLStart(builder *flatbuffers.Builder)

func ACLStartPayloadVector

func ACLStartPayloadVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func AuthAddDevice

func AuthAddDevice(builder *flatbuffers.Builder, device flatbuffers.UOffsetT)

func AuthAddId

func AuthAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func AuthAddMsgtype

func AuthAddMsgtype(builder *flatbuffers.Builder, msgtype MsgType)

func AuthAddOffset

func AuthAddOffset(builder *flatbuffers.Builder, offset int64)

func AuthAddToken

func AuthAddToken(builder *flatbuffers.Builder, token flatbuffers.UOffsetT)

func AuthEnd

func AuthEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func AuthStart

func AuthStart(builder *flatbuffers.Builder)

func CreateMetadata

func CreateMetadata(builder *flatbuffers.Builder, timestamp int64, offset int64) flatbuffers.UOffsetT

func HeaderAddId

func HeaderAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func HeaderAddMsgtype

func HeaderAddMsgtype(builder *flatbuffers.Builder, msgtype MsgType)

func HeaderEnd

func HeaderEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func HeaderStart

func HeaderStart(builder *flatbuffers.Builder)

func MessageAddCiphertext

func MessageAddCiphertext(builder *flatbuffers.Builder, ciphertext flatbuffers.UOffsetT)

func MessageAddId

func MessageAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func MessageAddMetadata

func MessageAddMetadata(builder *flatbuffers.Builder, metadata flatbuffers.UOffsetT)

func MessageAddMsgtype

func MessageAddMsgtype(builder *flatbuffers.Builder, msgtype MsgType)

func MessageAddRecipient

func MessageAddRecipient(builder *flatbuffers.Builder, recipient flatbuffers.UOffsetT)

func MessageAddSender

func MessageAddSender(builder *flatbuffers.Builder, sender flatbuffers.UOffsetT)

func MessageAddSubtype

func MessageAddSubtype(builder *flatbuffers.Builder, subtype MsgSubType)

func MessageEnd

func MessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func MessageStart

func MessageStart(builder *flatbuffers.Builder)

func MessageStartCiphertextVector

func MessageStartCiphertextVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT

func NotificationAddError

func NotificationAddError(builder *flatbuffers.Builder, error flatbuffers.UOffsetT)

func NotificationAddErrtype

func NotificationAddErrtype(builder *flatbuffers.Builder, errtype ErrType)

func NotificationAddId

func NotificationAddId(builder *flatbuffers.Builder, id flatbuffers.UOffsetT)

func NotificationAddMsgtype

func NotificationAddMsgtype(builder *flatbuffers.Builder, msgtype MsgType)

func NotificationEnd

func NotificationEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT

func NotificationStart

func NotificationStart(builder *flatbuffers.Builder)

Types

type ACL

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

func GetRootAsACL

func GetRootAsACL(buf []byte, offset flatbuffers.UOffsetT) *ACL

func (*ACL) Command

func (rcv *ACL) Command() ACLCommand

func (*ACL) Id

func (rcv *ACL) Id() []byte

func (*ACL) Init

func (rcv *ACL) Init(buf []byte, i flatbuffers.UOffsetT)

func (*ACL) Msgtype

func (rcv *ACL) Msgtype() MsgType

func (*ACL) MutateCommand

func (rcv *ACL) MutateCommand(n ACLCommand) bool

func (*ACL) MutateMsgtype

func (rcv *ACL) MutateMsgtype(n MsgType) bool

func (*ACL) MutatePayload

func (rcv *ACL) MutatePayload(j int, n byte) bool

func (*ACL) Payload

func (rcv *ACL) Payload(j int) byte

func (*ACL) PayloadBytes

func (rcv *ACL) PayloadBytes() []byte

func (*ACL) PayloadLength

func (rcv *ACL) PayloadLength() int

func (*ACL) Table

func (rcv *ACL) Table() flatbuffers.Table

type ACLCommand

type ACLCommand int8
const (
	ACLCommandLIST   ACLCommand = 0
	ACLCommandPERMIT ACLCommand = 1
	ACLCommandREVOKE ACLCommand = 2
)

func (ACLCommand) String

func (v ACLCommand) String() string

type Auth

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

func GetRootAsAuth

func GetRootAsAuth(buf []byte, offset flatbuffers.UOffsetT) *Auth

func (*Auth) Device

func (rcv *Auth) Device() []byte

func (*Auth) Id

func (rcv *Auth) Id() []byte

func (*Auth) Init

func (rcv *Auth) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Auth) Msgtype

func (rcv *Auth) Msgtype() MsgType

func (*Auth) MutateMsgtype

func (rcv *Auth) MutateMsgtype(n MsgType) bool

func (*Auth) MutateOffset

func (rcv *Auth) MutateOffset(n int64) bool

func (*Auth) Offset

func (rcv *Auth) Offset() int64

func (*Auth) Table

func (rcv *Auth) Table() flatbuffers.Table

func (*Auth) Token

func (rcv *Auth) Token() []byte

type ErrType

type ErrType int8
const (
	ErrTypeErrConnection ErrType = 0
	ErrTypeErrBadRequest ErrType = 1
	ErrTypeErrInternal   ErrType = 2
	ErrTypeErrMessage    ErrType = 3
	ErrTypeErrAuth       ErrType = 4
	ErrTypeErrACL        ErrType = 5
)

func (ErrType) String

func (v ErrType) String() string
type Header struct {
	// contains filtered or unexported fields
}

func GetRootAsHeader

func GetRootAsHeader(buf []byte, offset flatbuffers.UOffsetT) *Header

func (*Header) Id

func (rcv *Header) Id() []byte

func (*Header) Init

func (rcv *Header) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Header) Msgtype

func (rcv *Header) Msgtype() MsgType

func (*Header) MutateMsgtype

func (rcv *Header) MutateMsgtype(n MsgType) bool

func (*Header) Table

func (rcv *Header) Table() flatbuffers.Table

type Message

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

func GetRootAsMessage

func GetRootAsMessage(buf []byte, offset flatbuffers.UOffsetT) *Message

func (*Message) Ciphertext

func (rcv *Message) Ciphertext(j int) byte

func (*Message) CiphertextBytes

func (rcv *Message) CiphertextBytes() []byte

func (*Message) CiphertextLength

func (rcv *Message) CiphertextLength() int

func (*Message) Id

func (rcv *Message) Id() []byte

func (*Message) Init

func (rcv *Message) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Message) Metadata

func (rcv *Message) Metadata(obj *Metadata) *Metadata

func (*Message) Msgtype

func (rcv *Message) Msgtype() MsgType

func (*Message) MutateCiphertext

func (rcv *Message) MutateCiphertext(j int, n byte) bool

func (*Message) MutateMsgtype

func (rcv *Message) MutateMsgtype(n MsgType) bool

func (*Message) MutateSubtype

func (rcv *Message) MutateSubtype(n MsgSubType) bool

func (*Message) Recipient

func (rcv *Message) Recipient() []byte

func (*Message) Sender

func (rcv *Message) Sender() []byte

func (*Message) Subtype

func (rcv *Message) Subtype() MsgSubType

func (*Message) Table

func (rcv *Message) Table() flatbuffers.Table

type Metadata

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

func (*Metadata) Init

func (rcv *Metadata) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Metadata) MutateOffset

func (rcv *Metadata) MutateOffset(n int64) bool

func (*Metadata) MutateTimestamp

func (rcv *Metadata) MutateTimestamp(n int64) bool

func (*Metadata) Offset

func (rcv *Metadata) Offset() int64

func (*Metadata) Table

func (rcv *Metadata) Table() flatbuffers.Table

func (*Metadata) Timestamp

func (rcv *Metadata) Timestamp() int64

type MsgSubType

type MsgSubType uint16
const (
	MsgSubTypeUnknown                    MsgSubType = 0
	MsgSubTypeAuthenticationReq          MsgSubType = 1
	MsgSubTypeAuthenticationResp         MsgSubType = 2
	MsgSubTypeAuthenticationQRResp       MsgSubType = 3
	MsgSubTypeAuthenticationDeepLinkResp MsgSubType = 4
	MsgSubTypeFactReq                    MsgSubType = 5
	MsgSubTypeFactResp                   MsgSubType = 6
	MsgSubTypeFactQRResp                 MsgSubType = 7
	MsgSubTypeFactDeepLinkResp           MsgSubType = 8
	MsgSubTypeEmailSecurityCodeReq       MsgSubType = 9
	MsgSubTypeEmailSecurityCodeResp      MsgSubType = 10
	MsgSubTypePhoneSecurityCodeReq       MsgSubType = 11
	MsgSubTypePhoneSecurityCodeResp      MsgSubType = 12
	MsgSubTypePhoneVerificationReq       MsgSubType = 13
	MsgSubTypePhoneVerificationResp      MsgSubType = 14
	MsgSubTypeEmailVerificationReq       MsgSubType = 15
	MsgSubTypeEmailVerificationResp      MsgSubType = 16
	MsgSubTypeDocumentVerificationReq    MsgSubType = 17
	MsgSubTypeDocumentVerificationResp   MsgSubType = 18
)

func (MsgSubType) String

func (v MsgSubType) String() string

type MsgType

type MsgType int8
const (
	MsgTypeMSG  MsgType = 0
	MsgTypeACK  MsgType = 1
	MsgTypeERR  MsgType = 2
	MsgTypeAUTH MsgType = 3
	MsgTypeACL  MsgType = 4
)

func (MsgType) String

func (v MsgType) String() string

type Notification

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

func GetRootAsNotification

func GetRootAsNotification(buf []byte, offset flatbuffers.UOffsetT) *Notification

func (*Notification) Error

func (rcv *Notification) Error() []byte

func (*Notification) Errtype

func (rcv *Notification) Errtype() ErrType

func (*Notification) Id

func (rcv *Notification) Id() []byte

func (*Notification) Init

func (rcv *Notification) Init(buf []byte, i flatbuffers.UOffsetT)

func (*Notification) Msgtype

func (rcv *Notification) Msgtype() MsgType

func (*Notification) MutateErrtype

func (rcv *Notification) MutateErrtype(n ErrType) bool

func (*Notification) MutateMsgtype

func (rcv *Notification) MutateMsgtype(n MsgType) bool

func (*Notification) Table

func (rcv *Notification) Table() flatbuffers.Table

Jump to

Keyboard shortcuts

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