Documentation
¶
Index ¶
- Constants
- Variables
- type BootValidation
- func (*BootValidation) Descriptor() ([]byte, []int)deprecated
- func (x *BootValidation) GetBytes() []byte
- func (x *BootValidation) GetType() ValidationType
- func (*BootValidation) ProtoMessage()
- func (x *BootValidation) ProtoReflect() protoreflect.Message
- func (x *BootValidation) Reset()
- func (x *BootValidation) String() string
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetInit() *InitCommand
- func (x *Command) GetOpCode() OpCode
- func (x *Command) GetReset_() *ResetCommand
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type FwType
- func (FwType) Descriptor() protoreflect.EnumDescriptor
- func (x FwType) Enum() *FwType
- func (FwType) EnumDescriptor() ([]byte, []int)deprecated
- func (x FwType) Number() protoreflect.EnumNumber
- func (x FwType) String() string
- func (FwType) Type() protoreflect.EnumType
- func (x *FwType) UnmarshalJSON(b []byte) errordeprecated
- type Hash
- type HashType
- func (HashType) Descriptor() protoreflect.EnumDescriptor
- func (x HashType) Enum() *HashType
- func (HashType) EnumDescriptor() ([]byte, []int)deprecated
- func (x HashType) Number() protoreflect.EnumNumber
- func (x HashType) String() string
- func (HashType) Type() protoreflect.EnumType
- func (x *HashType) UnmarshalJSON(b []byte) errordeprecated
- type InitCommand
- func (*InitCommand) Descriptor() ([]byte, []int)deprecated
- func (x *InitCommand) GetAppSize() uint32
- func (x *InitCommand) GetBlSize() uint32
- func (x *InitCommand) GetBootValidation() []*BootValidation
- func (x *InitCommand) GetFwVersion() uint32
- func (x *InitCommand) GetHash() *Hash
- func (x *InitCommand) GetHwVersion() uint32
- func (x *InitCommand) GetIsDebug() bool
- func (x *InitCommand) GetSdReq() []uint32
- func (x *InitCommand) GetSdSize() uint32
- func (x *InitCommand) GetType() FwType
- func (*InitCommand) ProtoMessage()
- func (x *InitCommand) ProtoReflect() protoreflect.Message
- func (x *InitCommand) Reset()
- func (x *InitCommand) String() string
- type OpCode
- func (OpCode) Descriptor() protoreflect.EnumDescriptor
- func (x OpCode) Enum() *OpCode
- func (OpCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x OpCode) Number() protoreflect.EnumNumber
- func (x OpCode) String() string
- func (OpCode) Type() protoreflect.EnumType
- func (x *OpCode) UnmarshalJSON(b []byte) errordeprecated
- type Packet
- type ResetCommand
- type SignatureType
- func (SignatureType) Descriptor() protoreflect.EnumDescriptor
- func (x SignatureType) Enum() *SignatureType
- func (SignatureType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SignatureType) Number() protoreflect.EnumNumber
- func (x SignatureType) String() string
- func (SignatureType) Type() protoreflect.EnumType
- func (x *SignatureType) UnmarshalJSON(b []byte) errordeprecated
- type SignedCommand
- func (*SignedCommand) Descriptor() ([]byte, []int)deprecated
- func (x *SignedCommand) GetCommand() *Command
- func (x *SignedCommand) GetSignature() []byte
- func (x *SignedCommand) GetSignatureType() SignatureType
- func (*SignedCommand) ProtoMessage()
- func (x *SignedCommand) ProtoReflect() protoreflect.Message
- func (x *SignedCommand) Reset()
- func (x *SignedCommand) String() string
- type ValidationType
- func (ValidationType) Descriptor() protoreflect.EnumDescriptor
- func (x ValidationType) Enum() *ValidationType
- func (ValidationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ValidationType) Number() protoreflect.EnumNumber
- func (x ValidationType) String() string
- func (ValidationType) Type() protoreflect.EnumType
- func (x *ValidationType) UnmarshalJSON(b []byte) errordeprecated
Constants ¶
const (
Default_InitCommand_IsDebug = bool(false)
)
Default values for InitCommand fields.
Variables ¶
var ( OpCode_name = map[int32]string{ 0: "RESET", 1: "INIT", } OpCode_value = map[string]int32{ "RESET": 0, "INIT": 1, } )
Enum value maps for OpCode.
var ( FwType_name = map[int32]string{ 0: "APPLICATION", 1: "SOFTDEVICE", 2: "BOOTLOADER", 3: "SOFTDEVICE_BOOTLOADER", 4: "EXTERNAL_APPLICATION", } FwType_value = map[string]int32{ "APPLICATION": 0, "SOFTDEVICE": 1, "BOOTLOADER": 2, "SOFTDEVICE_BOOTLOADER": 3, "EXTERNAL_APPLICATION": 4, } )
Enum value maps for FwType.
var ( HashType_name = map[int32]string{ 0: "NO_HASH", 1: "CRC", 2: "SHA128", 3: "SHA256", 4: "SHA512", } HashType_value = map[string]int32{ "NO_HASH": 0, "CRC": 1, "SHA128": 2, "SHA256": 3, "SHA512": 4, } )
Enum value maps for HashType.
var ( ValidationType_name = map[int32]string{ 0: "NO_VALIDATION", 1: "VALIDATE_GENERATED_CRC", 2: "VALIDATE_SHA256", 3: "VALIDATE_ECDSA_P256_SHA256", } ValidationType_value = map[string]int32{ "NO_VALIDATION": 0, "VALIDATE_GENERATED_CRC": 1, "VALIDATE_SHA256": 2, "VALIDATE_ECDSA_P256_SHA256": 3, } )
Enum value maps for ValidationType.
var ( SignatureType_name = map[int32]string{ 0: "ECDSA_P256_SHA256", 1: "ED25519", } SignatureType_value = map[string]int32{ "ECDSA_P256_SHA256": 0, "ED25519": 1, } )
Enum value maps for SignatureType.
var File_dfu_cc_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BootValidation ¶
type BootValidation struct { Type *ValidationType `protobuf:"varint,1,req,name=type,enum=dfu.ValidationType" json:"type,omitempty"` Bytes []byte `protobuf:"bytes,2,req,name=bytes" json:"bytes,omitempty"` // contains filtered or unexported fields }
func (*BootValidation) Descriptor
deprecated
func (*BootValidation) Descriptor() ([]byte, []int)
Deprecated: Use BootValidation.ProtoReflect.Descriptor instead.
func (*BootValidation) GetBytes ¶
func (x *BootValidation) GetBytes() []byte
func (*BootValidation) GetType ¶
func (x *BootValidation) GetType() ValidationType
func (*BootValidation) ProtoMessage ¶
func (*BootValidation) ProtoMessage()
func (*BootValidation) ProtoReflect ¶
func (x *BootValidation) ProtoReflect() protoreflect.Message
func (*BootValidation) Reset ¶
func (x *BootValidation) Reset()
func (*BootValidation) String ¶
func (x *BootValidation) String() string
type Command ¶
type Command struct { OpCode *OpCode `protobuf:"varint,1,opt,name=op_code,json=opCode,enum=dfu.OpCode" json:"op_code,omitempty"` Init *InitCommand `protobuf:"bytes,2,opt,name=init" json:"init,omitempty"` Reset_ *ResetCommand `protobuf:"bytes,3,opt,name=reset" json:"reset,omitempty"` // contains filtered or unexported fields }
Command type
func (*Command) Descriptor
deprecated
func (*Command) GetInit ¶
func (x *Command) GetInit() *InitCommand
func (*Command) GetReset_ ¶
func (x *Command) GetReset_() *ResetCommand
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type FwType ¶
type FwType int32
func (FwType) Descriptor ¶
func (FwType) Descriptor() protoreflect.EnumDescriptor
func (FwType) EnumDescriptor
deprecated
func (FwType) Number ¶
func (x FwType) Number() protoreflect.EnumNumber
func (FwType) Type ¶
func (FwType) Type() protoreflect.EnumType
func (*FwType) UnmarshalJSON
deprecated
type Hash ¶
type Hash struct { HashType *HashType `protobuf:"varint,1,req,name=hash_type,json=hashType,enum=dfu.HashType" json:"hash_type,omitempty"` Hash []byte `protobuf:"bytes,2,req,name=hash" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*Hash) Descriptor
deprecated
func (*Hash) GetHashType ¶
func (*Hash) ProtoMessage ¶
func (*Hash) ProtoMessage()
func (*Hash) ProtoReflect ¶
func (x *Hash) ProtoReflect() protoreflect.Message
type HashType ¶
type HashType int32
func (HashType) Descriptor ¶
func (HashType) Descriptor() protoreflect.EnumDescriptor
func (HashType) EnumDescriptor
deprecated
func (HashType) Number ¶
func (x HashType) Number() protoreflect.EnumNumber
func (HashType) Type ¶
func (HashType) Type() protoreflect.EnumType
func (*HashType) UnmarshalJSON
deprecated
type InitCommand ¶
type InitCommand struct { FwVersion *uint32 `protobuf:"varint,1,opt,name=fw_version,json=fwVersion" json:"fw_version,omitempty"` HwVersion *uint32 `protobuf:"varint,2,opt,name=hw_version,json=hwVersion" json:"hw_version,omitempty"` SdReq []uint32 `protobuf:"varint,3,rep,packed,name=sd_req,json=sdReq" json:"sd_req,omitempty"` // packed option is default in proto3 Type *FwType `protobuf:"varint,4,opt,name=type,enum=dfu.FwType" json:"type,omitempty"` SdSize *uint32 `protobuf:"varint,5,opt,name=sd_size,json=sdSize" json:"sd_size,omitempty"` BlSize *uint32 `protobuf:"varint,6,opt,name=bl_size,json=blSize" json:"bl_size,omitempty"` AppSize *uint32 `protobuf:"varint,7,opt,name=app_size,json=appSize" json:"app_size,omitempty"` Hash *Hash `protobuf:"bytes,8,opt,name=hash" json:"hash,omitempty"` IsDebug *bool `protobuf:"varint,9,opt,name=is_debug,json=isDebug,def=0" json:"is_debug,omitempty"` BootValidation []*BootValidation `protobuf:"bytes,10,rep,name=boot_validation,json=bootValidation" json:"boot_validation,omitempty"` // contains filtered or unexported fields }
Commands data
func (*InitCommand) Descriptor
deprecated
func (*InitCommand) Descriptor() ([]byte, []int)
Deprecated: Use InitCommand.ProtoReflect.Descriptor instead.
func (*InitCommand) GetAppSize ¶
func (x *InitCommand) GetAppSize() uint32
func (*InitCommand) GetBlSize ¶
func (x *InitCommand) GetBlSize() uint32
func (*InitCommand) GetBootValidation ¶
func (x *InitCommand) GetBootValidation() []*BootValidation
func (*InitCommand) GetFwVersion ¶
func (x *InitCommand) GetFwVersion() uint32
func (*InitCommand) GetHash ¶
func (x *InitCommand) GetHash() *Hash
func (*InitCommand) GetHwVersion ¶
func (x *InitCommand) GetHwVersion() uint32
func (*InitCommand) GetIsDebug ¶
func (x *InitCommand) GetIsDebug() bool
func (*InitCommand) GetSdReq ¶
func (x *InitCommand) GetSdReq() []uint32
func (*InitCommand) GetSdSize ¶
func (x *InitCommand) GetSdSize() uint32
func (*InitCommand) GetType ¶
func (x *InitCommand) GetType() FwType
func (*InitCommand) ProtoMessage ¶
func (*InitCommand) ProtoMessage()
func (*InitCommand) ProtoReflect ¶
func (x *InitCommand) ProtoReflect() protoreflect.Message
func (*InitCommand) Reset ¶
func (x *InitCommand) Reset()
func (*InitCommand) String ¶
func (x *InitCommand) String() string
type OpCode ¶
type OpCode int32
Definition of enums and types
func (OpCode) Descriptor ¶
func (OpCode) Descriptor() protoreflect.EnumDescriptor
func (OpCode) EnumDescriptor
deprecated
func (OpCode) Number ¶
func (x OpCode) Number() protoreflect.EnumNumber
func (OpCode) Type ¶
func (OpCode) Type() protoreflect.EnumType
func (*OpCode) UnmarshalJSON
deprecated
type Packet ¶
type Packet struct { Command *Command `protobuf:"bytes,1,opt,name=command" json:"command,omitempty"` SignedCommand *SignedCommand `protobuf:"bytes,2,opt,name=signed_command,json=signedCommand" json:"signed_command,omitempty"` // contains filtered or unexported fields }
Parent packet type
func (*Packet) Descriptor
deprecated
func (*Packet) GetCommand ¶
func (*Packet) GetSignedCommand ¶
func (x *Packet) GetSignedCommand() *SignedCommand
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶
func (x *Packet) ProtoReflect() protoreflect.Message
type ResetCommand ¶
type ResetCommand struct { Timeout *uint32 `protobuf:"varint,1,req,name=timeout" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*ResetCommand) Descriptor
deprecated
func (*ResetCommand) Descriptor() ([]byte, []int)
Deprecated: Use ResetCommand.ProtoReflect.Descriptor instead.
func (*ResetCommand) GetTimeout ¶
func (x *ResetCommand) GetTimeout() uint32
func (*ResetCommand) ProtoMessage ¶
func (*ResetCommand) ProtoMessage()
func (*ResetCommand) ProtoReflect ¶
func (x *ResetCommand) ProtoReflect() protoreflect.Message
func (*ResetCommand) Reset ¶
func (x *ResetCommand) Reset()
func (*ResetCommand) String ¶
func (x *ResetCommand) String() string
type SignatureType ¶
type SignatureType int32
Signed command types
const ( SignatureType_ECDSA_P256_SHA256 SignatureType = 0 SignatureType_ED25519 SignatureType = 1 )
func (SignatureType) Descriptor ¶
func (SignatureType) Descriptor() protoreflect.EnumDescriptor
func (SignatureType) Enum ¶
func (x SignatureType) Enum() *SignatureType
func (SignatureType) EnumDescriptor
deprecated
func (SignatureType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SignatureType.Descriptor instead.
func (SignatureType) Number ¶
func (x SignatureType) Number() protoreflect.EnumNumber
func (SignatureType) String ¶
func (x SignatureType) String() string
func (SignatureType) Type ¶
func (SignatureType) Type() protoreflect.EnumType
func (*SignatureType) UnmarshalJSON
deprecated
func (x *SignatureType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type SignedCommand ¶
type SignedCommand struct { Command *Command `protobuf:"bytes,1,req,name=command" json:"command,omitempty"` SignatureType *SignatureType `protobuf:"varint,2,req,name=signature_type,json=signatureType,enum=dfu.SignatureType" json:"signature_type,omitempty"` Signature []byte `protobuf:"bytes,3,req,name=signature" json:"signature,omitempty"` // contains filtered or unexported fields }
func (*SignedCommand) Descriptor
deprecated
func (*SignedCommand) Descriptor() ([]byte, []int)
Deprecated: Use SignedCommand.ProtoReflect.Descriptor instead.
func (*SignedCommand) GetCommand ¶
func (x *SignedCommand) GetCommand() *Command
func (*SignedCommand) GetSignature ¶
func (x *SignedCommand) GetSignature() []byte
func (*SignedCommand) GetSignatureType ¶
func (x *SignedCommand) GetSignatureType() SignatureType
func (*SignedCommand) ProtoMessage ¶
func (*SignedCommand) ProtoMessage()
func (*SignedCommand) ProtoReflect ¶
func (x *SignedCommand) ProtoReflect() protoreflect.Message
func (*SignedCommand) Reset ¶
func (x *SignedCommand) Reset()
func (*SignedCommand) String ¶
func (x *SignedCommand) String() string
type ValidationType ¶
type ValidationType int32
const ( ValidationType_NO_VALIDATION ValidationType = 0 ValidationType_VALIDATE_GENERATED_CRC ValidationType = 1 ValidationType_VALIDATE_SHA256 ValidationType = 2 ValidationType_VALIDATE_ECDSA_P256_SHA256 ValidationType = 3 )
func (ValidationType) Descriptor ¶
func (ValidationType) Descriptor() protoreflect.EnumDescriptor
func (ValidationType) Enum ¶
func (x ValidationType) Enum() *ValidationType
func (ValidationType) EnumDescriptor
deprecated
func (ValidationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ValidationType.Descriptor instead.
func (ValidationType) Number ¶
func (x ValidationType) Number() protoreflect.EnumNumber
func (ValidationType) String ¶
func (x ValidationType) String() string
func (ValidationType) Type ¶
func (ValidationType) Type() protoreflect.EnumType
func (*ValidationType) UnmarshalJSON
deprecated
func (x *ValidationType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.