api

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatusCode added in v1.3.3

func GetStatusCode(err error) (int, bool)

func NewErrStatus added in v1.3.1

func NewErrStatus(code int) error

Types

type Client

type Client interface {
	GetEvaluation(req *model.GetEvaluationRequest) (*model.GetEvaluationResponse, int, error)
	RegisterEvents(req *model.RegisterEventsRequest) (*model.RegisterEventsResponse, int, error)
}

Client is the client interface for the Bucketeer APIGateway service.

func NewClient

func NewClient(conf *ClientConfig) (Client, error)

NewClient creates a new Client.

NewClient returns error if failed to dial gRPC.

type ClientConfig

type ClientConfig struct {
	// APIKey is the key to use the Bucketeer APIGateway service.
	APIKey string

	// Host is the host name of the target service, e.g. api.example.com.
	Host string
}

ClientConfig is the config for Client.

Jump to

Keyboard shortcuts

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