41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
// Code generated by sdkgen. DO NOT EDIT.
|
|
|
|
//nolint
|
|
package postgresql
|
|
|
|
import (
|
|
"context"
|
|
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/postgresql/v1"
|
|
)
|
|
|
|
//revive:disable
|
|
|
|
// BackupServiceClient is a postgresql.BackupServiceClient with
|
|
// lazy GRPC connection initialization.
|
|
type BackupServiceClient struct {
|
|
getConn func(ctx context.Context) (*grpc.ClientConn, error)
|
|
}
|
|
|
|
var _ postgresql.BackupServiceClient = &BackupServiceClient{}
|
|
|
|
// Get implements postgresql.BackupServiceClient
|
|
func (c *BackupServiceClient) Get(ctx context.Context, in *postgresql.GetBackupRequest, opts ...grpc.CallOption) (*postgresql.Backup, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return postgresql.NewBackupServiceClient(conn).Get(ctx, in, opts...)
|
|
}
|
|
|
|
// List implements postgresql.BackupServiceClient
|
|
func (c *BackupServiceClient) List(ctx context.Context, in *postgresql.ListBackupsRequest, opts ...grpc.CallOption) (*postgresql.ListBackupsResponse, error) {
|
|
conn, err := c.getConn(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return postgresql.NewBackupServiceClient(conn).List(ctx, in, opts...)
|
|
}
|