qr

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_qr_proto protoreflect.FileDescriptor

Functions

func NewQrEndpoints

func NewQrEndpoints() []*api.Endpoint

func RegisterQrHandler

func RegisterQrHandler(s server.Server, hdlr QrHandler, opts ...server.HandlerOption) error

Types

type GenerateRequest

type GenerateRequest struct {

	// the text to encode as a QR code (URL, phone number, email, etc)
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// the size (height and width) in pixels of the generated QR code. Defaults to 256
	Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateRequest) Descriptor deprecated

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

Deprecated: Use GenerateRequest.ProtoReflect.Descriptor instead.

func (*GenerateRequest) GetSize

func (x *GenerateRequest) GetSize() int64

func (*GenerateRequest) GetText

func (x *GenerateRequest) GetText() string

func (*GenerateRequest) ProtoMessage

func (*GenerateRequest) ProtoMessage()

func (*GenerateRequest) ProtoReflect

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

func (*GenerateRequest) Reset

func (x *GenerateRequest) Reset()

func (*GenerateRequest) String

func (x *GenerateRequest) String() string

type GenerateResponse

type GenerateResponse struct {

	// link to the QR code image in PNG format
	Qr string `protobuf:"bytes,1,opt,name=qr,proto3" json:"qr,omitempty"`
	// contains filtered or unexported fields
}

func (*GenerateResponse) Descriptor deprecated

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

Deprecated: Use GenerateResponse.ProtoReflect.Descriptor instead.

func (*GenerateResponse) GetQr

func (x *GenerateResponse) GetQr() string

func (*GenerateResponse) ProtoMessage

func (*GenerateResponse) ProtoMessage()

func (*GenerateResponse) ProtoReflect

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

func (*GenerateResponse) Reset

func (x *GenerateResponse) Reset()

func (*GenerateResponse) String

func (x *GenerateResponse) String() string

type QrHandler

type QrHandler interface {
	// Generate a QR code
	Generate(context.Context, *GenerateRequest, *GenerateResponse) error
}

type QrService

type QrService interface {
	// Generate a QR code
	Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
}

func NewQrService

func NewQrService(name string, c client.Client) QrService

Jump to

Keyboard shortcuts

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