proto

package
v0.0.0-...-3f8b912 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBud = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBud   = fmt.Errorf("proto: integer overflow")
)

Functions

func BudAccount

func BudAccount(account *Account) bud.Account

BudAccount converts a proto Account to bud.Account.

func BudCategory

func BudCategory(category *Category) bud.Category

BudCategory converts a proto Category to bud.Category.

func BudPlannedTransaction

func BudPlannedTransaction(plannedTransaction *PlannedTransaction) bud.PlannedTransaction

BudPlannedTransaction converts a proto PlannedTransaction to bud.PlannedTransaction.

func BudTransaction

func BudTransaction(transaction *Transaction) bud.Transaction

BudTransaction converts a proto Transaction to bud.Transaction.

func BudTransformation

func BudTransformation(transformation *Transformation) bud.Transformation

BudTransformation converts a proto Transformation to bud.Transformation.

Types

type Account

type Account struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Balance              int64    `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func ProtoAccount

func ProtoAccount(account bud.Account) *Account

ProtoAccount converts a bud.Account to User.

func (*Account) Descriptor

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

func (*Account) GetBalance

func (m *Account) GetBalance() int64

func (*Account) GetName

func (m *Account) GetName() string

func (*Account) GetUUID

func (m *Account) GetUUID() string

func (*Account) Marshal

func (m *Account) Marshal() (dAtA []byte, err error)

func (*Account) MarshalTo

func (m *Account) MarshalTo(dAtA []byte) (int, error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

func (m *Account) Size() (n int)

func (*Account) String

func (m *Account) String() string

func (*Account) Unmarshal

func (m *Account) Unmarshal(dAtA []byte) error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

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

func (*Account) XXX_Merge

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

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

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

type Category

type Category struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func ProtoCategory

func ProtoCategory(category bud.Category) *Category

ProtoCategory converts a bud.Category to Category.

func (*Category) Descriptor

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

func (*Category) GetName

func (m *Category) GetName() string

func (*Category) GetUUID

func (m *Category) GetUUID() string

func (*Category) Marshal

func (m *Category) Marshal() (dAtA []byte, err error)

func (*Category) MarshalTo

func (m *Category) MarshalTo(dAtA []byte) (int, error)

func (*Category) ProtoMessage

func (*Category) ProtoMessage()

func (*Category) Reset

func (m *Category) Reset()

func (*Category) Size

func (m *Category) Size() (n int)

func (*Category) String

func (m *Category) String() string

func (*Category) Unmarshal

func (m *Category) Unmarshal(dAtA []byte) error

func (*Category) XXX_DiscardUnknown

func (m *Category) XXX_DiscardUnknown()

func (*Category) XXX_Marshal

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

func (*Category) XXX_Merge

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

func (*Category) XXX_Size

func (m *Category) XXX_Size() int

func (*Category) XXX_Unmarshal

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

type PlannedTransaction

type PlannedTransaction struct {
	UUID                 string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	AccountUUID          string   `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"`
	CategoryUUID         string   `protobuf:"bytes,3,opt,name=category_uuid,json=categoryUuid,proto3" json:"category_uuid,omitempty"`
	Description          string   `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Amount               int64    `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"`
	Recurrence           string   `protobuf:"bytes,6,opt,name=recurrence,proto3" json:"recurrence,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func ProtoPlannedTransaction

func ProtoPlannedTransaction(plannedTransaction bud.PlannedTransaction) *PlannedTransaction

ProtoPlannedTransaction converts a bud.PlannedTransaction to PlannedTransaction.

func (*PlannedTransaction) Descriptor

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

func (*PlannedTransaction) GetAccountUUID

func (m *PlannedTransaction) GetAccountUUID() string

func (*PlannedTransaction) GetAmount

func (m *PlannedTransaction) GetAmount() int64

func (*PlannedTransaction) GetCategoryUUID

func (m *PlannedTransaction) GetCategoryUUID() string

func (*PlannedTransaction) GetDescription

func (m *PlannedTransaction) GetDescription() string

func (*PlannedTransaction) GetRecurrence

func (m *PlannedTransaction) GetRecurrence() string

func (*PlannedTransaction) GetUUID

func (m *PlannedTransaction) GetUUID() string

func (*PlannedTransaction) Marshal

func (m *PlannedTransaction) Marshal() (dAtA []byte, err error)

func (*PlannedTransaction) MarshalTo

func (m *PlannedTransaction) MarshalTo(dAtA []byte) (int, error)

func (*PlannedTransaction) ProtoMessage

func (*PlannedTransaction) ProtoMessage()

func (*PlannedTransaction) Reset

func (m *PlannedTransaction) Reset()

func (*PlannedTransaction) Size

func (m *PlannedTransaction) Size() (n int)

func (*PlannedTransaction) String

func (m *PlannedTransaction) String() string

func (*PlannedTransaction) Unmarshal

func (m *PlannedTransaction) Unmarshal(dAtA []byte) error

func (*PlannedTransaction) XXX_DiscardUnknown

func (m *PlannedTransaction) XXX_DiscardUnknown()

func (*PlannedTransaction) XXX_Marshal

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

func (*PlannedTransaction) XXX_Merge

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

func (*PlannedTransaction) XXX_Size

func (m *PlannedTransaction) XXX_Size() int

func (*PlannedTransaction) XXX_Unmarshal

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

type Transaction

type Transaction struct {
	UUID                   string               `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	AccountUUID            string               `protobuf:"bytes,2,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"`
	CategoryUUID           string               `protobuf:"bytes,3,opt,name=category_uuid,json=categoryUuid,proto3" json:"category_uuid,omitempty"`
	PlannedTransactionUUID string               `` /* 129-byte string literal not displayed */
	TransformationUUID     string               `protobuf:"bytes,5,opt,name=transformation_uuid,json=transformationUuid,proto3" json:"transformation_uuid,omitempty"`
	Description            string               `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	Amount                 int64                `protobuf:"varint,7,opt,name=amount,proto3" json:"amount,omitempty"`
	TransactedAt           *timestamp.Timestamp `protobuf:"bytes,8,opt,name=transacted_at,json=transactedAt,proto3" json:"transacted_at,omitempty"`
	XXX_NoUnkeyedLiteral   struct{}             `json:"-"`
	XXX_unrecognized       []byte               `json:"-"`
	XXX_sizecache          int32                `json:"-"`
}

func ProtoTransaction

func ProtoTransaction(transaction bud.Transaction) *Transaction

ProtoTransaction converts a bud.Transaction to Transaction.

func (*Transaction) Descriptor

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

func (*Transaction) GetAccountUUID

func (m *Transaction) GetAccountUUID() string

func (*Transaction) GetAmount

func (m *Transaction) GetAmount() int64

func (*Transaction) GetCategoryUUID

func (m *Transaction) GetCategoryUUID() string

func (*Transaction) GetDescription

func (m *Transaction) GetDescription() string

func (*Transaction) GetPlannedTransactionUUID

func (m *Transaction) GetPlannedTransactionUUID() string

func (*Transaction) GetTransactedAt

func (m *Transaction) GetTransactedAt() *timestamp.Timestamp

func (*Transaction) GetTransformationUUID

func (m *Transaction) GetTransformationUUID() string

func (*Transaction) GetUUID

func (m *Transaction) GetUUID() string

func (*Transaction) Marshal

func (m *Transaction) Marshal() (dAtA []byte, err error)

func (*Transaction) MarshalTo

func (m *Transaction) MarshalTo(dAtA []byte) (int, error)

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) Reset

func (m *Transaction) Reset()

func (*Transaction) Size

func (m *Transaction) Size() (n int)

func (*Transaction) String

func (m *Transaction) String() string

func (*Transaction) Unmarshal

func (m *Transaction) Unmarshal(dAtA []byte) error

func (*Transaction) XXX_DiscardUnknown

func (m *Transaction) XXX_DiscardUnknown()

func (*Transaction) XXX_Marshal

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

func (*Transaction) XXX_Merge

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

func (*Transaction) XXX_Size

func (m *Transaction) XXX_Size() int

func (*Transaction) XXX_Unmarshal

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

type Transformation

type Transformation struct {
	UUID                   string   `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Description            string   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Pattern                string   `protobuf:"bytes,3,opt,name=pattern,proto3" json:"pattern,omitempty"`
	CategoryUUID           string   `protobuf:"bytes,4,opt,name=category_uuid,json=categoryUuid,proto3" json:"category_uuid,omitempty"`
	PlannedTransactionUUID string   `` /* 129-byte string literal not displayed */
	DescriptionFormat      string   `protobuf:"bytes,6,opt,name=description_format,json=descriptionFormat,proto3" json:"description_format,omitempty"`
	XXX_NoUnkeyedLiteral   struct{} `json:"-"`
	XXX_unrecognized       []byte   `json:"-"`
	XXX_sizecache          int32    `json:"-"`
}

func ProtoTransformation

func ProtoTransformation(transformation bud.Transformation) *Transformation

ProtoTransformation converts a bud.Transformation to Transformation.

func (*Transformation) Descriptor

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

func (*Transformation) GetCategoryUUID

func (m *Transformation) GetCategoryUUID() string

func (*Transformation) GetDescription

func (m *Transformation) GetDescription() string

func (*Transformation) GetDescriptionFormat

func (m *Transformation) GetDescriptionFormat() string

func (*Transformation) GetPattern

func (m *Transformation) GetPattern() string

func (*Transformation) GetPlannedTransactionUUID

func (m *Transformation) GetPlannedTransactionUUID() string

func (*Transformation) GetUUID

func (m *Transformation) GetUUID() string

func (*Transformation) Marshal

func (m *Transformation) Marshal() (dAtA []byte, err error)

func (*Transformation) MarshalTo

func (m *Transformation) MarshalTo(dAtA []byte) (int, error)

func (*Transformation) ProtoMessage

func (*Transformation) ProtoMessage()

func (*Transformation) Reset

func (m *Transformation) Reset()

func (*Transformation) Size

func (m *Transformation) Size() (n int)

func (*Transformation) String

func (m *Transformation) String() string

func (*Transformation) Unmarshal

func (m *Transformation) Unmarshal(dAtA []byte) error

func (*Transformation) XXX_DiscardUnknown

func (m *Transformation) XXX_DiscardUnknown()

func (*Transformation) XXX_Marshal

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

func (*Transformation) XXX_Merge

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

func (*Transformation) XXX_Size

func (m *Transformation) XXX_Size() int

func (*Transformation) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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