server

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

GAPIC Showcase Server

Release Level CircleCI Code Coverage GoDoc

A server to test generated clients.

This is a server used to test the features of GAPICs (Generated API Client) generated by the gapic-generators in googleapis.

Usage

# Install the server
go get github.com/googlapis/gapic-showcase

# Spin up the server. Opens port 7469 to accept requests.
go run $GOPATH/src/github.com/googleapis/gapic-showcase/cmd/server/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEchoServer added in v0.0.4

func NewEchoServer() pb.EchoServer

NewEchoServer returns a new EchoServer for the Showcase API.

func NewTestingServer added in v0.0.5

func NewTestingServer() pb.TestingServer

NewTestingServer returns a new TestingServer for the Showcase API.

Types

type Session added in v0.0.5

type Session interface {
	GetName() string
	GetReport() *pb.ReportSessionResponse
	AddTest(t Test) error
	DeleteTest(name string) error
	AddAnswers(name string, answers []string) error
	TestAnswers(name string, answers []string) error
}
var Instance Session = &sessionImpl{
	name:  "-",
	mu:    sync.Mutex{},
	tests: map[string]Test{},
}

func GetSessionSingleton added in v0.0.5

func GetSessionSingleton() Session

type Test added in v0.0.5

type Test interface {
	GetName() string
	GetExpectationLevel() pb.Test_ExpectationLevel
	GetProto() *pb.Test
	GetState() pb.ReportSessionResponse_State
	GetIssue() *pb.ReportSessionResponse_Issue
	GetAnswers() []string

	HasFailed() bool
}

func NewTest added in v0.0.5

func NewTest(t *pb.Test, issue *pb.ReportSessionResponse_Issue, state pb.ReportSessionResponse_State, answers []string) Test

func TestFromProto added in v0.0.5

func TestFromProto(t *pb.Test) Test

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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