grpc_clients

package
v0.0.0-...-c1987ff Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadClient

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

func NewDownloadClient

func NewDownloadClient(target string) (*DownloadClient, error)

func (*DownloadClient) Download

type KeyGeneratorClient

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

KeyGeneratorClient wraps the generated gRPC client for easier use.

func NewKeyGeneratorClient

func NewKeyGeneratorClient(target string) (*KeyGeneratorClient, error)

NewKeyGeneratorClient creates a new KeyGeneratorClient and establishes a connection to the given target.

func (*KeyGeneratorClient) GetKey

func (c *KeyGeneratorClient) GetKey(ctx context.Context) (string, error)

GetKey sends a request to the Key Generator service to fetch a key.

type UploadClient

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

func NewUploadClient

func NewUploadClient(target string) (*UploadClient, error)

Creates a new UploadClient and establishes a connection to the gRPC server

func (*UploadClient) Upload

func (c *UploadClient) Upload(key string, expirationDate time.Time, data []byte) (string, error)

Upload method calls the gRPC Upload RPC

Jump to

Keyboard shortcuts

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