Documentation
¶
Index ¶
- func GetKarteClient(ctx context.Context) kartepb.KarteClient
- func NewClient(ctx context.Context, c *Config, o ...Option) (kartepb.KarteClient, error)
- func NewCronClient(ctx context.Context, c *Config, o ...Option) (kartepb.KarteCronClient, error)
- func WithKarteClient(ctx context.Context, client kartepb.KarteClient) context.Context
- type Config
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKarteClient ¶
func GetKarteClient(ctx context.Context) kartepb.KarteClient
GetKarteClient retrieves a Karte client from the context.
func NewCronClient ¶
NewCronClient creates a new client for the Karte service.
func WithKarteClient ¶
WithKarteClient adds a Karte client to the context.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config stores options needed for the Karte service.
func DevConfig ¶
DevConfig returns a configuration for the Karte client intended to talk to the dev instance of Karte, which is a cloud project.
The auth options are required and must be passed in explicitly. The hostname and type of login are set to reasonable defaults for a local command line tool.
func EmptyConfig ¶
func EmptyConfig() *Config
EmptyConfig is a config with no content. It is expected to fail to construct a client if used as the base config without the appropriate options being set.
func LocalConfig ¶
LocalConfig returns a configuration for the Karte client intended for local use, such as in the karte command line tool.
The auth options are required and must be passed in explicitly. The hostname and type of login are set to reasonable defaults for a local command line tool.
func ProdConfig ¶
ProdConfig returns a configuration for the Karte client intended to talk to the dev instance of Karte, which is a cloud project.
The auth options are required and must be passed in explicitly. The hostname and type of login are set to reasonable defaults for a local command line tool.