usecase

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

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

Call represents a use case for making RPC calls.

func NewCall

func NewCall(
	output io.Writer,
	descSrc descriptor.Source,
	clientConn grpc.ClientConnInterface,
	msgParser format.MessageParser,
	msgFormatter format.MessageFormatter,
	md metadata.MD,
) *Call

NewCall returns a new instance of Call.

func (*Call) MakeRPCCall

func (c *Call) MakeRPCCall(ctx context.Context, methodName string) error

MakeRPCCall makes an RPC call using the provided configuration and method name.

type Request

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

Request represents a use case for populating a request message to stdout or a file.

func NewRequest

NewRequest returns a new instance of Request.

func (*Request) Prepare

func (r *Request) Prepare(ctx context.Context, method string) error

Prepare formats a request message for the specified method, and optionally allows editing it before writing it to an output. Editing a message is in JSON format only, but the actual output format will depend on a message formatter.

Jump to

Keyboard shortcuts

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