dbrecords

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalBinary

func MarshalBinary(v interface{}) ([]byte, error)

MarshalBinary marshals the passed domain object into a byte slice suitable for storing it into the acmeproxy database.

func UnmarshalBinary

func UnmarshalBinary(bs []byte, v interface{}) error

UnmarshalBinary unmarshals the passed byte slice into v which should be a pointer to a passed domain object.

Types

type BinaryMarshaller

type BinaryMarshaller struct {
	V interface{}
	// contains filtered or unexported fields
}

BinaryMarshaller wraps a value V and provides a binary representation of value. Once the BinaryMarshaller was used to create a binary representation of V it must not be reused.

func (*BinaryMarshaller) MarshalBinary

func (m *BinaryMarshaller) MarshalBinary() ([]byte, error)

MarshalBinary creates a binary representation of the object wrapped by the BinaryMarshaller.

type BinaryUnmarshaller

type BinaryUnmarshaller struct {
	V interface{}
	// contains filtered or unexported fields
}

BinaryUnmarshaller wraps a target value V and reads its contents from a binary representation.

Once the Umarshaller has been used it must not be used again.

func (*BinaryUnmarshaller) UnmarshalBinary

func (u *BinaryUnmarshaller) UnmarshalBinary(bs []byte) error

UnmarshalBinary creates a domain object from the passed bytes.

type Domain

type Domain struct {
	UserID               []byte   `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	CertificatePEM       []byte   `protobuf:"bytes,3,opt,name=certificatePEM,proto3" json:"certificatePEM,omitempty"`
	PrivateKeyPEM        []byte   `protobuf:"bytes,4,opt,name=privateKeyPEM,proto3" json:"privateKeyPEM,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Domain) Descriptor

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

func (*Domain) GetCertificatePEM

func (m *Domain) GetCertificatePEM() []byte

func (*Domain) GetName

func (m *Domain) GetName() string

func (*Domain) GetPrivateKeyPEM

func (m *Domain) GetPrivateKeyPEM() []byte

func (*Domain) GetUserID

func (m *Domain) GetUserID() []byte

func (*Domain) ProtoMessage

func (*Domain) ProtoMessage()

func (*Domain) Reset

func (m *Domain) Reset()

func (*Domain) String

func (m *Domain) String() string

func (*Domain) XXX_DiscardUnknown

func (m *Domain) XXX_DiscardUnknown()

func (*Domain) XXX_Marshal

func (m *Domain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Domain) XXX_Merge

func (m *Domain) XXX_Merge(src proto.Message)

func (*Domain) XXX_Size

func (m *Domain) XXX_Size() int

func (*Domain) XXX_Unmarshal

func (m *Domain) XXX_Unmarshal(b []byte) error

type User

type User struct {
	Id                   []byte           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	AccountURL           string           `protobuf:"bytes,2,opt,name=accountURL,proto3" json:"accountURL,omitempty"`
	AccountKey           *User_AccountKey `protobuf:"bytes,3,opt,name=accountKey,proto3" json:"accountKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*User) Descriptor

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

func (*User) GetAccountKey

func (m *User) GetAccountKey() *User_AccountKey

func (*User) GetAccountURL

func (m *User) GetAccountURL() string

func (*User) GetId

func (m *User) GetId() []byte

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type User_AccountKey

type User_AccountKey struct {
	KeyType              uint32   `protobuf:"varint,1,opt,name=keyType,proto3" json:"keyType,omitempty"`
	KeyBytes             []byte   `protobuf:"bytes,2,opt,name=keyBytes,proto3" json:"keyBytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User_AccountKey) Descriptor

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

func (*User_AccountKey) GetKeyBytes

func (m *User_AccountKey) GetKeyBytes() []byte

func (*User_AccountKey) GetKeyType

func (m *User_AccountKey) GetKeyType() uint32

func (*User_AccountKey) ProtoMessage

func (*User_AccountKey) ProtoMessage()

func (*User_AccountKey) Reset

func (m *User_AccountKey) Reset()

func (*User_AccountKey) String

func (m *User_AccountKey) String() string

func (*User_AccountKey) XXX_DiscardUnknown

func (m *User_AccountKey) XXX_DiscardUnknown()

func (*User_AccountKey) XXX_Marshal

func (m *User_AccountKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User_AccountKey) XXX_Merge

func (m *User_AccountKey) XXX_Merge(src proto.Message)

func (*User_AccountKey) XXX_Size

func (m *User_AccountKey) XXX_Size() int

func (*User_AccountKey) XXX_Unmarshal

func (m *User_AccountKey) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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