taxpb

package module
v0.0.0-...-838a961 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ServiceName = "paysupertaxservice"
	Version     = "latest"
)

Variables

View Source
var File_tax_service_proto protoreflect.FileDescriptor

Functions

func RegisterTaxServiceHandler

func RegisterTaxServiceHandler(s server.Server, hdlr TaxServiceHandler, opts ...server.HandlerOption) error

Types

type DeleteRateRequest

type DeleteRateRequest struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteRateRequest) Descriptor deprecated

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

Deprecated: Use DeleteRateRequest.ProtoReflect.Descriptor instead.

func (*DeleteRateRequest) GetId

func (x *DeleteRateRequest) GetId() uint32

func (*DeleteRateRequest) ProtoMessage

func (*DeleteRateRequest) ProtoMessage()

func (*DeleteRateRequest) ProtoReflect

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

func (*DeleteRateRequest) Reset

func (x *DeleteRateRequest) Reset()

func (*DeleteRateRequest) String

func (x *DeleteRateRequest) String() string

type DeleteRateResponse

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

func (*DeleteRateResponse) Descriptor deprecated

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

Deprecated: Use DeleteRateResponse.ProtoReflect.Descriptor instead.

func (*DeleteRateResponse) ProtoMessage

func (*DeleteRateResponse) ProtoMessage()

func (*DeleteRateResponse) ProtoReflect

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

func (*DeleteRateResponse) Reset

func (x *DeleteRateResponse) Reset()

func (*DeleteRateResponse) String

func (x *DeleteRateResponse) String() string

type GeoIdentity

type GeoIdentity struct {

	// @inject_tag: json:"zip"
	Zip string `protobuf:"bytes,1,opt,name=zip,proto3" json:"zip"`
	// @inject_tag: json:"country"
	Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country"`
	// @inject_tag: json:"city,omitempty"
	City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"`
	// @inject_tag: json:"state,omitempty"
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*GeoIdentity) Descriptor deprecated

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

Deprecated: Use GeoIdentity.ProtoReflect.Descriptor instead.

func (*GeoIdentity) GetCity

func (x *GeoIdentity) GetCity() string

func (*GeoIdentity) GetCountry

func (x *GeoIdentity) GetCountry() string

func (*GeoIdentity) GetState

func (x *GeoIdentity) GetState() string

func (*GeoIdentity) GetZip

func (x *GeoIdentity) GetZip() string

func (*GeoIdentity) ProtoMessage

func (*GeoIdentity) ProtoMessage()

func (*GeoIdentity) ProtoReflect

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

func (*GeoIdentity) Reset

func (x *GeoIdentity) Reset()

func (*GeoIdentity) String

func (x *GeoIdentity) String() string

type GetRatesRequest

type GetRatesRequest struct {

	// @inject_tag: json:"zip"
	Zip string `protobuf:"bytes,1,opt,name=zip,proto3" json:"zip"`
	// @inject_tag: json:"country"
	Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country"`
	// @inject_tag: json:"city,omitempty"
	City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"`
	// @inject_tag: json:"state,omitempty"
	State string `protobuf:"bytes,4,opt,name=state,proto3" json:"state,omitempty"`
	// @inject_tag: json:"limit,omitempty"
	Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
	// @inject_tag: json:"offset,omitempty"
	Offset int32 `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRatesRequest) Descriptor deprecated

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

Deprecated: Use GetRatesRequest.ProtoReflect.Descriptor instead.

func (*GetRatesRequest) GetCity

func (x *GetRatesRequest) GetCity() string

func (*GetRatesRequest) GetCountry

func (x *GetRatesRequest) GetCountry() string

func (*GetRatesRequest) GetLimit

func (x *GetRatesRequest) GetLimit() int32

func (*GetRatesRequest) GetOffset

func (x *GetRatesRequest) GetOffset() int32

func (*GetRatesRequest) GetState

func (x *GetRatesRequest) GetState() string

func (*GetRatesRequest) GetZip

func (x *GetRatesRequest) GetZip() string

func (*GetRatesRequest) ProtoMessage

func (*GetRatesRequest) ProtoMessage()

func (*GetRatesRequest) ProtoReflect

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

func (*GetRatesRequest) Reset

func (x *GetRatesRequest) Reset()

func (*GetRatesRequest) String

func (x *GetRatesRequest) String() string

type GetRatesResponse

type GetRatesResponse struct {

	// @inject_tag: json:"rates"
	Rates []*TaxRate `protobuf:"bytes,1,rep,name=rates,proto3" json:"rates"`
	// contains filtered or unexported fields
}

func (*GetRatesResponse) Descriptor deprecated

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

Deprecated: Use GetRatesResponse.ProtoReflect.Descriptor instead.

func (*GetRatesResponse) GetRates

func (x *GetRatesResponse) GetRates() []*TaxRate

func (*GetRatesResponse) ProtoMessage

func (*GetRatesResponse) ProtoMessage()

func (*GetRatesResponse) ProtoReflect

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

func (*GetRatesResponse) Reset

func (x *GetRatesResponse) Reset()

func (*GetRatesResponse) String

func (x *GetRatesResponse) String() string

type TaxRate

type TaxRate struct {

	// @inject_tag: json:"id"
	//
	// The unique identifier for the tax rate.
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
	// @inject_tag: json:"zip"
	//
	// The ZIP code.
	Zip string `protobuf:"bytes,2,opt,name=zip,proto3" json:"zip"`
	// @inject_tag: json:"country"
	//
	// The country's name. Two-letter country code in ISO 3166-1, in uppercase (for instance US).
	Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country"`
	// @inject_tag: json:"city,omitempty"
	//
	// The city.
	City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
	// @inject_tag: gorm:"type:varchar(2)"
	//
	// The state code in ISO 3166-2.
	State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty" gorm:"type:varchar(2)"`
	// @inject_tag: json:"rate"
	//
	// The tax rate.
	Rate float64 `protobuf:"fixed64,6,opt,name=rate,proto3" json:"rate"`
	// contains filtered or unexported fields
}

func (*TaxRate) Descriptor deprecated

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

Deprecated: Use TaxRate.ProtoReflect.Descriptor instead.

func (*TaxRate) GetCity

func (x *TaxRate) GetCity() string

func (*TaxRate) GetCountry

func (x *TaxRate) GetCountry() string

func (*TaxRate) GetId

func (x *TaxRate) GetId() uint32

func (*TaxRate) GetRate

func (x *TaxRate) GetRate() float64

func (*TaxRate) GetState

func (x *TaxRate) GetState() string

func (*TaxRate) GetZip

func (x *TaxRate) GetZip() string

func (*TaxRate) ProtoMessage

func (*TaxRate) ProtoMessage()

func (*TaxRate) ProtoReflect

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

func (*TaxRate) Reset

func (x *TaxRate) Reset()

func (*TaxRate) String

func (x *TaxRate) String() string

type TaxService

type TaxService interface {
	GetRate(ctx context.Context, in *GeoIdentity, opts ...client.CallOption) (*TaxRate, error)
	GetRates(ctx context.Context, in *GetRatesRequest, opts ...client.CallOption) (*GetRatesResponse, error)
	CreateOrUpdate(ctx context.Context, in *TaxRate, opts ...client.CallOption) (*TaxRate, error)
	DeleteRateById(ctx context.Context, in *DeleteRateRequest, opts ...client.CallOption) (*DeleteRateResponse, error)
}

func NewTaxService

func NewTaxService(name string, c client.Client) TaxService

type TaxServiceHandler

type TaxServiceHandler interface {
	GetRate(context.Context, *GeoIdentity, *TaxRate) error
	GetRates(context.Context, *GetRatesRequest, *GetRatesResponse) error
	CreateOrUpdate(context.Context, *TaxRate, *TaxRate) error
	DeleteRateById(context.Context, *DeleteRateRequest, *DeleteRateResponse) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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