Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(go-sdk): OpenFgaClient should satisfy SdkClient interface #144

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions config/clients/go/template/client/client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (

var (
_ _context.Context
// Ensure the SdkClient fits OpenFgaClient interface
_ SdkClient = (*OpenFgaClient)(nil)
)

var DEFAULT_MAX_METHOD_PARALLEL_REQS = int32({{clientMaxMethodParallelRequests}})
Expand Down Expand Up @@ -218,28 +220,28 @@ type SdkClient interface {
/*
* ReadAuthorizationModel Read a particular authorization model.
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return SdkClientReadAuthorizationModelRequest
* @return SdkClientReadAuthorizationModelRequestInterface
*/
ReadAuthorizationModel(ctx _context.Context) SdkClientReadAuthorizationModelRequest
ReadAuthorizationModel(ctx _context.Context) SdkClientReadAuthorizationModelRequestInterface

/*
* ReadAuthorizationModelExecute executes the ReadAuthorizationModel request
* @return *ClientReadAuthorizationModelResponse
*/
ReadAuthorizationModelExecute(request SdkClientReadAuthorizationModelRequest) (*ClientReadAuthorizationModelResponse, error)
ReadAuthorizationModelExecute(request SdkClientReadAuthorizationModelRequestInterface) (*ClientReadAuthorizationModelResponse, error)

/*
* ReadLatestAuthorizationModel Reads the latest authorization model (note: this ignores the model id in configuration).
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @return SdkClientReadLatestAuthorizationModelRequest
* @return SdkClientReadLatestAuthorizationModelRequestInterface
*/
ReadLatestAuthorizationModel(ctx _context.Context) SdkClientReadLatestAuthorizationModelRequest
ReadLatestAuthorizationModel(ctx _context.Context) SdkClientReadLatestAuthorizationModelRequestInterface

/*
* ReadLatestAuthorizationModelExecute executes the ReadLatestAuthorizationModel request
* @return *ClientReadAuthorizationModelResponse
*/
ReadLatestAuthorizationModelExecute(request SdkClientReadLatestAuthorizationModelRequest) (*ClientReadAuthorizationModelResponse, error)
ReadLatestAuthorizationModelExecute(request SdkClientReadLatestAuthorizationModelRequestInterface) (*ClientReadAuthorizationModelResponse, error)

/* Relationship Tuples */

Expand Down