migration

package
v0.0.0-...-506a490 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Payload_OtpParameters_Algorithm_name = map[int32]string{
		0: "ALGORITHM_UNSPECIFIED",
		1: "ALGORITHM_SHA1",
		2: "ALGORITHM_SHA256",
		3: "ALGORITHM_SHA512",
		4: "ALGORITHM_MD5",
	}
	Payload_OtpParameters_Algorithm_value = map[string]int32{
		"ALGORITHM_UNSPECIFIED": 0,
		"ALGORITHM_SHA1":        1,
		"ALGORITHM_SHA256":      2,
		"ALGORITHM_SHA512":      3,
		"ALGORITHM_MD5":         4,
	}
)

Enum value maps for Payload_OtpParameters_Algorithm.

View Source
var (
	Payload_OtpParameters_DigitCount_name = map[int32]string{
		0: "DIGIT_COUNT_UNSPECIFIED",
		1: "DIGIT_COUNT_SIX",
		2: "DIGIT_COUNT_EIGHT",
	}
	Payload_OtpParameters_DigitCount_value = map[string]int32{
		"DIGIT_COUNT_UNSPECIFIED": 0,
		"DIGIT_COUNT_SIX":         1,
		"DIGIT_COUNT_EIGHT":       2,
	}
)

Enum value maps for Payload_OtpParameters_DigitCount.

View Source
var (
	Payload_OtpParameters_OtpType_name = map[int32]string{
		0: "OTP_TYPE_UNSPECIFIED",
		1: "OTP_TYPE_HOTP",
		2: "OTP_TYPE_TOTP",
	}
	Payload_OtpParameters_OtpType_value = map[string]int32{
		"OTP_TYPE_UNSPECIFIED": 0,
		"OTP_TYPE_HOTP":        1,
		"OTP_TYPE_TOTP":        2,
	}
)

Enum value maps for Payload_OtpParameters_OtpType.

View Source
var File_migration_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Parser

type Parser struct{}

func NewParser

func NewParser() Parser

func (Parser) FromProtoBytes

func (p Parser) FromProtoBytes(bytes []byte) (internal.OtpParameter, error)

func (Parser) Parse

func (p Parser) Parse(link string) (internal.Payload, error)

type Payload

type Payload struct {
	OtpParameters []*Payload_OtpParameters `protobuf:"bytes,1,rep,name=otp_parameters,json=otpParameters,proto3" json:"otp_parameters,omitempty"`
	Version       int32                    `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	BatchSize     int32                    `protobuf:"varint,3,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
	BatchIndex    int32                    `protobuf:"varint,4,opt,name=batch_index,json=batchIndex,proto3" json:"batch_index,omitempty"`
	BatchId       int32                    `protobuf:"varint,5,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetBatchId

func (x *Payload) GetBatchId() int32

func (*Payload) GetBatchIndex

func (x *Payload) GetBatchIndex() int32

func (*Payload) GetBatchSize

func (x *Payload) GetBatchSize() int32

func (*Payload) GetOtpParameters

func (x *Payload) GetOtpParameters() []*Payload_OtpParameters

func (*Payload) GetVersion

func (x *Payload) GetVersion() int32

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

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

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type Payload_OtpParameters

type Payload_OtpParameters struct {
	Secret    []byte                           `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	Name      string                           `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Issuer    string                           `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
	Algorithm Payload_OtpParameters_Algorithm  `protobuf:"varint,4,opt,name=algorithm,proto3,enum=migration.Payload_OtpParameters_Algorithm" json:"algorithm,omitempty"`
	Digits    Payload_OtpParameters_DigitCount `protobuf:"varint,5,opt,name=digits,proto3,enum=migration.Payload_OtpParameters_DigitCount" json:"digits,omitempty"`
	Type      Payload_OtpParameters_OtpType    `protobuf:"varint,6,opt,name=type,proto3,enum=migration.Payload_OtpParameters_OtpType" json:"type,omitempty"`
	Counter   uint64                           `protobuf:"varint,7,opt,name=counter,proto3" json:"counter,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload_OtpParameters) Descriptor deprecated

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

Deprecated: Use Payload_OtpParameters.ProtoReflect.Descriptor instead.

func (*Payload_OtpParameters) GetAlgorithm

func (*Payload_OtpParameters) GetCounter

func (x *Payload_OtpParameters) GetCounter() uint64

func (*Payload_OtpParameters) GetDigits

func (*Payload_OtpParameters) GetIssuer

func (x *Payload_OtpParameters) GetIssuer() string

func (*Payload_OtpParameters) GetName

func (x *Payload_OtpParameters) GetName() string

func (*Payload_OtpParameters) GetSecret

func (x *Payload_OtpParameters) GetSecret() []byte

func (*Payload_OtpParameters) GetType

func (*Payload_OtpParameters) ProtoMessage

func (*Payload_OtpParameters) ProtoMessage()

func (*Payload_OtpParameters) ProtoReflect

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

func (*Payload_OtpParameters) Reset

func (x *Payload_OtpParameters) Reset()

func (*Payload_OtpParameters) String

func (x *Payload_OtpParameters) String() string

type Payload_OtpParameters_Algorithm

type Payload_OtpParameters_Algorithm int32
const (
	Payload_OtpParameters_ALGORITHM_UNSPECIFIED Payload_OtpParameters_Algorithm = 0
	Payload_OtpParameters_ALGORITHM_SHA1        Payload_OtpParameters_Algorithm = 1
	Payload_OtpParameters_ALGORITHM_SHA256      Payload_OtpParameters_Algorithm = 2
	Payload_OtpParameters_ALGORITHM_SHA512      Payload_OtpParameters_Algorithm = 3
	Payload_OtpParameters_ALGORITHM_MD5         Payload_OtpParameters_Algorithm = 4
)

func (Payload_OtpParameters_Algorithm) Descriptor

func (Payload_OtpParameters_Algorithm) Enum

func (Payload_OtpParameters_Algorithm) EnumDescriptor deprecated

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

Deprecated: Use Payload_OtpParameters_Algorithm.Descriptor instead.

func (Payload_OtpParameters_Algorithm) Number

func (Payload_OtpParameters_Algorithm) String

func (Payload_OtpParameters_Algorithm) Type

type Payload_OtpParameters_DigitCount

type Payload_OtpParameters_DigitCount int32
const (
	Payload_OtpParameters_DIGIT_COUNT_UNSPECIFIED Payload_OtpParameters_DigitCount = 0
	Payload_OtpParameters_DIGIT_COUNT_SIX         Payload_OtpParameters_DigitCount = 1
	Payload_OtpParameters_DIGIT_COUNT_EIGHT       Payload_OtpParameters_DigitCount = 2
)

func (Payload_OtpParameters_DigitCount) Descriptor

func (Payload_OtpParameters_DigitCount) Enum

func (Payload_OtpParameters_DigitCount) EnumDescriptor deprecated

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

Deprecated: Use Payload_OtpParameters_DigitCount.Descriptor instead.

func (Payload_OtpParameters_DigitCount) Number

func (Payload_OtpParameters_DigitCount) String

func (Payload_OtpParameters_DigitCount) Type

type Payload_OtpParameters_OtpType

type Payload_OtpParameters_OtpType int32
const (
	Payload_OtpParameters_OTP_TYPE_UNSPECIFIED Payload_OtpParameters_OtpType = 0
	Payload_OtpParameters_OTP_TYPE_HOTP        Payload_OtpParameters_OtpType = 1
	Payload_OtpParameters_OTP_TYPE_TOTP        Payload_OtpParameters_OtpType = 2
)

func (Payload_OtpParameters_OtpType) Descriptor

func (Payload_OtpParameters_OtpType) Enum

func (Payload_OtpParameters_OtpType) EnumDescriptor deprecated

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

Deprecated: Use Payload_OtpParameters_OtpType.Descriptor instead.

func (Payload_OtpParameters_OtpType) Number

func (Payload_OtpParameters_OtpType) String

func (Payload_OtpParameters_OtpType) Type

Jump to

Keyboard shortcuts

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