qr

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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

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

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

Deprecated: Use Code.ProtoReflect.Descriptor instead.

func (*Code) GetCreated

func (x *Code) GetCreated() string

func (*Code) GetFile

func (x *Code) GetFile() string

func (*Code) GetId

func (x *Code) GetId() string

func (*Code) GetText

func (x *Code) GetText() string

func (*Code) ProtoMessage

func (*Code) ProtoMessage()

func (*Code) ProtoReflect

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

func (*Code) Reset

func (x *Code) Reset()

func (*Code) String

func (x *Code) String() string

type CodesRequest

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

List your QR codes

func (*CodesRequest) Descriptor deprecated

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

Deprecated: Use CodesRequest.ProtoReflect.Descriptor instead.

func (*CodesRequest) ProtoMessage

func (*CodesRequest) ProtoMessage()

func (*CodesRequest) ProtoReflect

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

func (*CodesRequest) Reset

func (x *CodesRequest) Reset()

func (*CodesRequest) String

func (x *CodesRequest) String() string

type CodesResponse

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

func (*CodesResponse) Descriptor deprecated

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

Deprecated: Use CodesResponse.ProtoReflect.Descriptor instead.

func (*CodesResponse) GetCodes

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

func (*CodesResponse) ProtoMessage

func (*CodesResponse) ProtoMessage()

func (*CodesResponse) ProtoReflect

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

func (*CodesResponse) Reset

func (x *CodesResponse) Reset()

func (*CodesResponse) String

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