qr

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 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 Code added in v1.1.0

type Code struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// text of the QR code
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// file name
	File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file,omitempty"`
	// time of creation
	Created string `protobuf:"bytes,4,opt,name=created,proto3" json:"created,omitempty"`
	// contains filtered or unexported fields
}

func (*Code) Descriptor deprecated added in v1.1.0

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

Deprecated: Use Code.ProtoReflect.Descriptor instead.

func (*Code) GetCreated added in v1.1.0

func (x *Code) GetCreated() string

func (*Code) GetFile added in v1.1.0

func (x *Code) GetFile() string

func (*Code) GetId added in v1.1.0

func (x *Code) GetId() string

func (*Code) GetText added in v1.1.0

func (x *Code) GetText() string

func (*Code) ProtoMessage added in v1.1.0

func (*Code) ProtoMessage()

func (*Code) ProtoReflect added in v1.1.0

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

func (*Code) Reset added in v1.1.0

func (x *Code) Reset()

func (*Code) String added in v1.1.0

func (x *Code) String() string

type CodesRequest added in v1.1.0

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

List your QR codes

func (*CodesRequest) Descriptor deprecated added in v1.1.0

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

Deprecated: Use CodesRequest.ProtoReflect.Descriptor instead.

func (*CodesRequest) ProtoMessage added in v1.1.0

func (*CodesRequest) ProtoMessage()

func (*CodesRequest) ProtoReflect added in v1.1.0

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

func (*CodesRequest) Reset added in v1.1.0

func (x *CodesRequest) Reset()

func (*CodesRequest) String added in v1.1.0

func (x *CodesRequest) String() string

type CodesResponse added in v1.1.0

type CodesResponse struct {
	Codes []*Code `protobuf:"bytes,1,rep,name=codes,proto3" json:"codes,omitempty"`
	// contains filtered or unexported fields
}

func (*CodesResponse) Descriptor deprecated added in v1.1.0

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

Deprecated: Use CodesResponse.ProtoReflect.Descriptor instead.

func (*CodesResponse) GetCodes added in v1.1.0

func (x *CodesResponse) GetCodes() []*Code

func (*CodesResponse) ProtoMessage added in v1.1.0

func (*CodesResponse) ProtoMessage()

func (*CodesResponse) ProtoReflect added in v1.1.0

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

func (*CodesResponse) Reset added in v1.1.0

func (x *CodesResponse) Reset()

func (*CodesResponse) String added in v1.1.0

func (x *CodesResponse) String() string

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
}

Generate a QR code with a specific text and size

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
	// List your QR codes
	Codes(context.Context, *CodesRequest, *CodesResponse) error
}

type QrService

type QrService interface {
	// Generate a QR code
	Generate(ctx context.Context, in *GenerateRequest, opts ...client.CallOption) (*GenerateResponse, error)
	// List your QR codes
	Codes(ctx context.Context, in *CodesRequest, opts ...client.CallOption) (*CodesResponse, 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