testimport

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

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

Go to latest
Published: Jun 4, 2019 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHtmlStringer = func(req, resp interface{}) ([]byte, error) {
	header := []byte("<p><div class=\"container\"><pre>")
	data, err := encoding_json.MarshalIndent(resp, "", "\t")
	if err != nil {
		return nil, err
	}
	footer := []byte("</pre></div></p>")
	return append(append(header, data...), footer...), nil
}
View Source
var Footer string = `
	</body>
	</html>
	`
View Source
var FormOtherLabel_Produce string = `` /* 21547-byte string literal not displayed */
View Source
var Header func(servName, methodName string) string = func(servName, methodName string) string {
	return `
	<html>
	<head>
	<title>` + servName + `:` + methodName + `</title>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
	</head>
	<body>
	`
}

Functions

func NewHTMLOtherLabelServer

func NewHTMLOtherLabelServer(client OtherLabelClient, stringer func(req, resp interface{}) ([]byte, error)) *htmlOtherLabel

func NewHandler

func NewHandler(grpcAddr string, stringer func(req, resp interface{}) ([]byte, error), opts ...google_golang_org_grpc.DialOption) (net_http.Handler, error)

func RegisterOtherLabelServer

func RegisterOtherLabelServer(s *grpc.Server, srv OtherLabelServer)

func Serve

func Serve(httpAddr, grpcAddr string, stringer func(req, resp interface{}) ([]byte, error), opts ...google_golang_org_grpc.DialOption)

Types

type OtherLabelClient

type OtherLabelClient interface {
	Produce(ctx context.Context, in *serve.Album, opts ...grpc.CallOption) (*serve.Album, error)
}

OtherLabelClient is the client API for OtherLabel service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOtherLabelClient

func NewOtherLabelClient(cc *grpc.ClientConn) OtherLabelClient

type OtherLabelServer

type OtherLabelServer interface {
	Produce(context.Context, *serve.Album) (*serve.Album, error)
}

OtherLabelServer is the server API for OtherLabel service.

type UnimplementedOtherLabelServer

type UnimplementedOtherLabelServer struct {
}

UnimplementedOtherLabelServer can be embedded to have forward compatible implementations.

func (*UnimplementedOtherLabelServer) Produce

Jump to

Keyboard shortcuts

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