snapshot of https://github.com/ory/keto.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
Some checks failed
CI / Run lints and checks (push) Failing after 47s
CI / Run tests (push) Failing after 1s
CI / Run race tests (push) Failing after 5s
CI / Build CLI docs (push) Has been skipped
CI / Run buf actions (push) Failing after 5s
CodeQL / Analyze (go) (push) Failing after 3s
CodeQL / Analyze (javascript) (push) Failing after 2s
Docker Image Scanners / scanners (push) Failing after 3s
Format / format (push) Failing after 3s
Synchronize Issue Labels / Synchronize Issue Labels (push) Has been skipped
CI / Generate release (push) Has been skipped
CI / Draft newsletter (push) Has been skipped
CI / Pending approval Slack notification (push) Has been skipped
CI / Send newsletter (push) Has been skipped
This commit is contained in:
24
internal/httpclient/.gitignore
generated
vendored
Normal file
24
internal/httpclient/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
23
internal/httpclient/.openapi-generator-ignore
generated
Normal file
23
internal/httpclient/.openapi-generator-ignore
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
70
internal/httpclient/.openapi-generator/FILES
generated
Normal file
70
internal/httpclient/.openapi-generator/FILES
generated
Normal file
@@ -0,0 +1,70 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
.travis.yml
|
||||
README.md
|
||||
api/openapi.yaml
|
||||
api_metadata.go
|
||||
api_permission.go
|
||||
api_relationship.go
|
||||
client.go
|
||||
configuration.go
|
||||
docs/BatchCheckPermissionBody.md
|
||||
docs/BatchCheckPermissionResult.md
|
||||
docs/CheckOplSyntaxResult.md
|
||||
docs/CheckPermissionResult.md
|
||||
docs/CheckPermissionResultWithError.md
|
||||
docs/CreateRelationshipBody.md
|
||||
docs/ErrorGeneric.md
|
||||
docs/ExpandedPermissionTree.md
|
||||
docs/GenericError.md
|
||||
docs/GetVersion200Response.md
|
||||
docs/HealthNotReadyStatus.md
|
||||
docs/HealthStatus.md
|
||||
docs/IsAlive200Response.md
|
||||
docs/IsReady503Response.md
|
||||
docs/MetadataApi.md
|
||||
docs/Namespace.md
|
||||
docs/ParseError.md
|
||||
docs/PermissionApi.md
|
||||
docs/PostCheckPermissionBody.md
|
||||
docs/PostCheckPermissionOrErrorBody.md
|
||||
docs/RelationQuery.md
|
||||
docs/Relationship.md
|
||||
docs/RelationshipApi.md
|
||||
docs/RelationshipNamespaces.md
|
||||
docs/RelationshipPatch.md
|
||||
docs/Relationships.md
|
||||
docs/SourcePosition.md
|
||||
docs/SubjectSet.md
|
||||
docs/Version.md
|
||||
git_push.sh
|
||||
go.mod
|
||||
go.sum
|
||||
model_batch_check_permission_body.go
|
||||
model_batch_check_permission_result.go
|
||||
model_check_opl_syntax_result.go
|
||||
model_check_permission_result.go
|
||||
model_check_permission_result_with_error.go
|
||||
model_create_relationship_body.go
|
||||
model_error_generic.go
|
||||
model_expanded_permission_tree.go
|
||||
model_generic_error.go
|
||||
model_get_version_200_response.go
|
||||
model_health_not_ready_status.go
|
||||
model_health_status.go
|
||||
model_is_alive_200_response.go
|
||||
model_is_ready_503_response.go
|
||||
model_namespace.go
|
||||
model_parse_error.go
|
||||
model_post_check_permission_body.go
|
||||
model_post_check_permission_or_error_body.go
|
||||
model_relation_query.go
|
||||
model_relationship.go
|
||||
model_relationship_namespaces.go
|
||||
model_relationship_patch.go
|
||||
model_relationships.go
|
||||
model_source_position.go
|
||||
model_subject_set.go
|
||||
model_version.go
|
||||
response.go
|
||||
utils.go
|
||||
1
internal/httpclient/.openapi-generator/VERSION
generated
Normal file
1
internal/httpclient/.openapi-generator/VERSION
generated
Normal file
@@ -0,0 +1 @@
|
||||
7.2.0
|
||||
7
internal/httpclient/.travis.yml
generated
Normal file
7
internal/httpclient/.travis.yml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
language: go
|
||||
|
||||
install:
|
||||
- go get -d -v .
|
||||
|
||||
script:
|
||||
- go build -v ./
|
||||
153
internal/httpclient/README.md
generated
Normal file
153
internal/httpclient/README.md
generated
Normal file
@@ -0,0 +1,153 @@
|
||||
# Go API client for client
|
||||
|
||||
Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
|
||||
|
||||
## Overview
|
||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
|
||||
|
||||
- API version:
|
||||
- Package version: 1.0.0
|
||||
- Build package: org.openapitools.codegen.languages.GoClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
Install the following dependencies:
|
||||
|
||||
```shell
|
||||
go get github.com/stretchr/testify/assert
|
||||
go get golang.org/x/oauth2
|
||||
go get golang.org/x/net/context
|
||||
```
|
||||
|
||||
Put the package under your project folder and add the following in import:
|
||||
|
||||
```golang
|
||||
import client "github.com/ory/keto-client-go"
|
||||
```
|
||||
|
||||
To use a proxy, set the environment variable `HTTP_PROXY`:
|
||||
|
||||
```golang
|
||||
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
|
||||
```
|
||||
|
||||
## Configuration of Server URL
|
||||
|
||||
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
|
||||
|
||||
### Select Server Configuration
|
||||
|
||||
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1)
|
||||
```
|
||||
|
||||
### Templated Server URL
|
||||
|
||||
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
|
||||
|
||||
```golang
|
||||
ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{
|
||||
"basePath": "v2",
|
||||
})
|
||||
```
|
||||
|
||||
Note, enum values are always validated and all unused variables are silently ignored.
|
||||
|
||||
### URLs Configuration per Operation
|
||||
|
||||
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
|
||||
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
|
||||
|
||||
```
|
||||
ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
|
||||
"{classname}Service.{nickname}": 2,
|
||||
})
|
||||
ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{
|
||||
"{classname}Service.{nickname}": {
|
||||
"port": "8443",
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*MetadataApi* | [**GetVersion**](docs/MetadataApi.md#getversion) | **Get** /version | Return Running Software Version.
|
||||
*MetadataApi* | [**IsAlive**](docs/MetadataApi.md#isalive) | **Get** /health/alive | Check HTTP Server Status
|
||||
*MetadataApi* | [**IsReady**](docs/MetadataApi.md#isready) | **Get** /health/ready | Check HTTP Server and Database Status
|
||||
*PermissionApi* | [**BatchCheckPermission**](docs/PermissionApi.md#batchcheckpermission) | **Post** /relation-tuples/batch/check | Batch check permissions
|
||||
*PermissionApi* | [**CheckPermission**](docs/PermissionApi.md#checkpermission) | **Get** /relation-tuples/check/openapi | Check a permission
|
||||
*PermissionApi* | [**CheckPermissionOrError**](docs/PermissionApi.md#checkpermissionorerror) | **Get** /relation-tuples/check | Check a permission
|
||||
*PermissionApi* | [**ExpandPermissions**](docs/PermissionApi.md#expandpermissions) | **Get** /relation-tuples/expand | Expand a Relationship into permissions.
|
||||
*PermissionApi* | [**PostCheckPermission**](docs/PermissionApi.md#postcheckpermission) | **Post** /relation-tuples/check/openapi | Check a permission
|
||||
*PermissionApi* | [**PostCheckPermissionOrError**](docs/PermissionApi.md#postcheckpermissionorerror) | **Post** /relation-tuples/check | Check a permission
|
||||
*RelationshipApi* | [**CheckOplSyntax**](docs/RelationshipApi.md#checkoplsyntax) | **Post** /opl/syntax/check | Check the syntax of an OPL file
|
||||
*RelationshipApi* | [**CreateRelationship**](docs/RelationshipApi.md#createrelationship) | **Put** /admin/relation-tuples | Create a Relationship
|
||||
*RelationshipApi* | [**DeleteRelationships**](docs/RelationshipApi.md#deleterelationships) | **Delete** /admin/relation-tuples | Delete Relationships
|
||||
*RelationshipApi* | [**GetRelationships**](docs/RelationshipApi.md#getrelationships) | **Get** /relation-tuples | Query relationships
|
||||
*RelationshipApi* | [**ListRelationshipNamespaces**](docs/RelationshipApi.md#listrelationshipnamespaces) | **Get** /namespaces | Query namespaces
|
||||
*RelationshipApi* | [**PatchRelationships**](docs/RelationshipApi.md#patchrelationships) | **Patch** /admin/relation-tuples | Patch Multiple Relationships
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [BatchCheckPermissionBody](docs/BatchCheckPermissionBody.md)
|
||||
- [BatchCheckPermissionResult](docs/BatchCheckPermissionResult.md)
|
||||
- [CheckOplSyntaxResult](docs/CheckOplSyntaxResult.md)
|
||||
- [CheckPermissionResult](docs/CheckPermissionResult.md)
|
||||
- [CheckPermissionResultWithError](docs/CheckPermissionResultWithError.md)
|
||||
- [CreateRelationshipBody](docs/CreateRelationshipBody.md)
|
||||
- [ErrorGeneric](docs/ErrorGeneric.md)
|
||||
- [ExpandedPermissionTree](docs/ExpandedPermissionTree.md)
|
||||
- [GenericError](docs/GenericError.md)
|
||||
- [GetVersion200Response](docs/GetVersion200Response.md)
|
||||
- [HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
|
||||
- [HealthStatus](docs/HealthStatus.md)
|
||||
- [IsAlive200Response](docs/IsAlive200Response.md)
|
||||
- [IsReady503Response](docs/IsReady503Response.md)
|
||||
- [Namespace](docs/Namespace.md)
|
||||
- [ParseError](docs/ParseError.md)
|
||||
- [PostCheckPermissionBody](docs/PostCheckPermissionBody.md)
|
||||
- [PostCheckPermissionOrErrorBody](docs/PostCheckPermissionOrErrorBody.md)
|
||||
- [RelationQuery](docs/RelationQuery.md)
|
||||
- [Relationship](docs/Relationship.md)
|
||||
- [RelationshipNamespaces](docs/RelationshipNamespaces.md)
|
||||
- [RelationshipPatch](docs/RelationshipPatch.md)
|
||||
- [Relationships](docs/Relationships.md)
|
||||
- [SourcePosition](docs/SourcePosition.md)
|
||||
- [SubjectSet](docs/SubjectSet.md)
|
||||
- [Version](docs/Version.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
Endpoints do not require authorization.
|
||||
|
||||
|
||||
## Documentation for Utility Methods
|
||||
|
||||
Due to the fact that model structure members are all pointers, this package contains
|
||||
a number of utility functions to easily obtain pointers to values of basic types.
|
||||
Each of these functions takes a value of the given basic type and returns a pointer to it:
|
||||
|
||||
* `PtrBool`
|
||||
* `PtrInt`
|
||||
* `PtrInt32`
|
||||
* `PtrInt64`
|
||||
* `PtrFloat`
|
||||
* `PtrFloat32`
|
||||
* `PtrFloat64`
|
||||
* `PtrString`
|
||||
* `PtrTime`
|
||||
|
||||
## Author
|
||||
|
||||
hi@ory.sh
|
||||
|
||||
1315
internal/httpclient/api/openapi.yaml
generated
Normal file
1315
internal/httpclient/api/openapi.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
442
internal/httpclient/api_metadata.go
generated
Normal file
442
internal/httpclient/api_metadata.go
generated
Normal file
@@ -0,0 +1,442 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ context.Context
|
||||
)
|
||||
|
||||
type MetadataApi interface {
|
||||
|
||||
/*
|
||||
* GetVersion Return Running Software Version.
|
||||
* This endpoint returns the version of Ory Keto.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the version will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return MetadataApiApiGetVersionRequest
|
||||
*/
|
||||
GetVersion(ctx context.Context) MetadataApiApiGetVersionRequest
|
||||
|
||||
/*
|
||||
* GetVersionExecute executes the request
|
||||
* @return GetVersion200Response
|
||||
*/
|
||||
GetVersionExecute(r MetadataApiApiGetVersionRequest) (*GetVersion200Response, *http.Response, error)
|
||||
|
||||
/*
|
||||
* IsAlive Check HTTP Server Status
|
||||
* This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming
|
||||
HTTP requests. This status does currently not include checks whether the database connection is working.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return MetadataApiApiIsAliveRequest
|
||||
*/
|
||||
IsAlive(ctx context.Context) MetadataApiApiIsAliveRequest
|
||||
|
||||
/*
|
||||
* IsAliveExecute executes the request
|
||||
* @return IsAlive200Response
|
||||
*/
|
||||
IsAliveExecute(r MetadataApiApiIsAliveRequest) (*IsAlive200Response, *http.Response, error)
|
||||
|
||||
/*
|
||||
* IsReady Check HTTP Server and Database Status
|
||||
* This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.
|
||||
the database) are responsive as well.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of Ory Keto, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return MetadataApiApiIsReadyRequest
|
||||
*/
|
||||
IsReady(ctx context.Context) MetadataApiApiIsReadyRequest
|
||||
|
||||
/*
|
||||
* IsReadyExecute executes the request
|
||||
* @return IsAlive200Response
|
||||
*/
|
||||
IsReadyExecute(r MetadataApiApiIsReadyRequest) (*IsAlive200Response, *http.Response, error)
|
||||
}
|
||||
|
||||
// MetadataApiService MetadataApi service
|
||||
type MetadataApiService service
|
||||
|
||||
type MetadataApiApiGetVersionRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataApi
|
||||
}
|
||||
|
||||
func (r MetadataApiApiGetVersionRequest) Execute() (*GetVersion200Response, *http.Response, error) {
|
||||
return r.ApiService.GetVersionExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
- GetVersion Return Running Software Version.
|
||||
- This endpoint returns the version of Ory Keto.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the version will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
- @return MetadataApiApiGetVersionRequest
|
||||
*/
|
||||
func (a *MetadataApiService) GetVersion(ctx context.Context) MetadataApiApiGetVersionRequest {
|
||||
return MetadataApiApiGetVersionRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return GetVersion200Response
|
||||
*/
|
||||
func (a *MetadataApiService) GetVersionExecute(r MetadataApiApiGetVersionRequest) (*GetVersion200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *GetVersion200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.GetVersion")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/version"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type MetadataApiApiIsAliveRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataApi
|
||||
}
|
||||
|
||||
func (r MetadataApiApiIsAliveRequest) Execute() (*IsAlive200Response, *http.Response, error) {
|
||||
return r.ApiService.IsAliveExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
- IsAlive Check HTTP Server Status
|
||||
- This endpoint returns a HTTP 200 status code when Ory Keto is accepting incoming
|
||||
|
||||
HTTP requests. This status does currently not include checks whether the database connection is working.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of this service, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
- @return MetadataApiApiIsAliveRequest
|
||||
*/
|
||||
func (a *MetadataApiService) IsAlive(ctx context.Context) MetadataApiApiIsAliveRequest {
|
||||
return MetadataApiApiIsAliveRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return IsAlive200Response
|
||||
*/
|
||||
func (a *MetadataApiService) IsAliveExecute(r MetadataApiApiIsAliveRequest) (*IsAlive200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *IsAlive200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsAlive")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/health/alive"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type MetadataApiApiIsReadyRequest struct {
|
||||
ctx context.Context
|
||||
ApiService MetadataApi
|
||||
}
|
||||
|
||||
func (r MetadataApiApiIsReadyRequest) Execute() (*IsAlive200Response, *http.Response, error) {
|
||||
return r.ApiService.IsReadyExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
- IsReady Check HTTP Server and Database Status
|
||||
- This endpoint returns a HTTP 200 status code when Ory Keto is up running and the environment dependencies (e.g.
|
||||
|
||||
the database) are responsive as well.
|
||||
|
||||
If the service supports TLS Edge Termination, this endpoint does not require the
|
||||
`X-Forwarded-Proto` header to be set.
|
||||
|
||||
Be aware that if you are running multiple nodes of Ory Keto, the health status will never
|
||||
refer to the cluster state, only to a single instance.
|
||||
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
- @return MetadataApiApiIsReadyRequest
|
||||
*/
|
||||
func (a *MetadataApiService) IsReady(ctx context.Context) MetadataApiApiIsReadyRequest {
|
||||
return MetadataApiApiIsReadyRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return IsAlive200Response
|
||||
*/
|
||||
func (a *MetadataApiService) IsReadyExecute(r MetadataApiApiIsReadyRequest) (*IsAlive200Response, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *IsAlive200Response
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetadataApiService.IsReady")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/health/ready"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json", "text/plain"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 503 {
|
||||
var v IsReady503Response
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v string
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
1067
internal/httpclient/api_permission.go
generated
Normal file
1067
internal/httpclient/api_permission.go
generated
Normal file
File diff suppressed because it is too large
Load Diff
953
internal/httpclient/api_relationship.go
generated
Normal file
953
internal/httpclient/api_relationship.go
generated
Normal file
@@ -0,0 +1,953 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
var (
|
||||
_ context.Context
|
||||
)
|
||||
|
||||
type RelationshipApi interface {
|
||||
|
||||
/*
|
||||
* CheckOplSyntax Check the syntax of an OPL file
|
||||
* The OPL file is expected in the body of the request.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiCheckOplSyntaxRequest
|
||||
*/
|
||||
CheckOplSyntax(ctx context.Context) RelationshipApiApiCheckOplSyntaxRequest
|
||||
|
||||
/*
|
||||
* CheckOplSyntaxExecute executes the request
|
||||
* @return CheckOplSyntaxResult
|
||||
*/
|
||||
CheckOplSyntaxExecute(r RelationshipApiApiCheckOplSyntaxRequest) (*CheckOplSyntaxResult, *http.Response, error)
|
||||
|
||||
/*
|
||||
* CreateRelationship Create a Relationship
|
||||
* Use this endpoint to create a relationship.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiCreateRelationshipRequest
|
||||
*/
|
||||
CreateRelationship(ctx context.Context) RelationshipApiApiCreateRelationshipRequest
|
||||
|
||||
/*
|
||||
* CreateRelationshipExecute executes the request
|
||||
* @return Relationship
|
||||
*/
|
||||
CreateRelationshipExecute(r RelationshipApiApiCreateRelationshipRequest) (*Relationship, *http.Response, error)
|
||||
|
||||
/*
|
||||
* DeleteRelationships Delete Relationships
|
||||
* Use this endpoint to delete relationships
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiDeleteRelationshipsRequest
|
||||
*/
|
||||
DeleteRelationships(ctx context.Context) RelationshipApiApiDeleteRelationshipsRequest
|
||||
|
||||
/*
|
||||
* DeleteRelationshipsExecute executes the request
|
||||
*/
|
||||
DeleteRelationshipsExecute(r RelationshipApiApiDeleteRelationshipsRequest) (*http.Response, error)
|
||||
|
||||
/*
|
||||
* GetRelationships Query relationships
|
||||
* Get all relationships that match the query. Only the namespace field is required.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiGetRelationshipsRequest
|
||||
*/
|
||||
GetRelationships(ctx context.Context) RelationshipApiApiGetRelationshipsRequest
|
||||
|
||||
/*
|
||||
* GetRelationshipsExecute executes the request
|
||||
* @return Relationships
|
||||
*/
|
||||
GetRelationshipsExecute(r RelationshipApiApiGetRelationshipsRequest) (*Relationships, *http.Response, error)
|
||||
|
||||
/*
|
||||
* ListRelationshipNamespaces Query namespaces
|
||||
* Get all namespaces
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiListRelationshipNamespacesRequest
|
||||
*/
|
||||
ListRelationshipNamespaces(ctx context.Context) RelationshipApiApiListRelationshipNamespacesRequest
|
||||
|
||||
/*
|
||||
* ListRelationshipNamespacesExecute executes the request
|
||||
* @return RelationshipNamespaces
|
||||
*/
|
||||
ListRelationshipNamespacesExecute(r RelationshipApiApiListRelationshipNamespacesRequest) (*RelationshipNamespaces, *http.Response, error)
|
||||
|
||||
/*
|
||||
* PatchRelationships Patch Multiple Relationships
|
||||
* Use this endpoint to patch one or more relationships.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiPatchRelationshipsRequest
|
||||
*/
|
||||
PatchRelationships(ctx context.Context) RelationshipApiApiPatchRelationshipsRequest
|
||||
|
||||
/*
|
||||
* PatchRelationshipsExecute executes the request
|
||||
*/
|
||||
PatchRelationshipsExecute(r RelationshipApiApiPatchRelationshipsRequest) (*http.Response, error)
|
||||
}
|
||||
|
||||
// RelationshipApiService RelationshipApi service
|
||||
type RelationshipApiService service
|
||||
|
||||
type RelationshipApiApiCheckOplSyntaxRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
body *string
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiCheckOplSyntaxRequest) Body(body string) RelationshipApiApiCheckOplSyntaxRequest {
|
||||
r.body = &body
|
||||
return r
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiCheckOplSyntaxRequest) Execute() (*CheckOplSyntaxResult, *http.Response, error) {
|
||||
return r.ApiService.CheckOplSyntaxExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* CheckOplSyntax Check the syntax of an OPL file
|
||||
* The OPL file is expected in the body of the request.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiCheckOplSyntaxRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) CheckOplSyntax(ctx context.Context) RelationshipApiApiCheckOplSyntaxRequest {
|
||||
return RelationshipApiApiCheckOplSyntaxRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return CheckOplSyntaxResult
|
||||
*/
|
||||
func (a *RelationshipApiService) CheckOplSyntaxExecute(r RelationshipApiApiCheckOplSyntaxRequest) (*CheckOplSyntaxResult, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *CheckOplSyntaxResult
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.CheckOplSyntax")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/opl/syntax/check"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"text/plain"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.body
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type RelationshipApiApiCreateRelationshipRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
createRelationshipBody *CreateRelationshipBody
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiCreateRelationshipRequest) CreateRelationshipBody(createRelationshipBody CreateRelationshipBody) RelationshipApiApiCreateRelationshipRequest {
|
||||
r.createRelationshipBody = &createRelationshipBody
|
||||
return r
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiCreateRelationshipRequest) Execute() (*Relationship, *http.Response, error) {
|
||||
return r.ApiService.CreateRelationshipExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* CreateRelationship Create a Relationship
|
||||
* Use this endpoint to create a relationship.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiCreateRelationshipRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) CreateRelationship(ctx context.Context) RelationshipApiApiCreateRelationshipRequest {
|
||||
return RelationshipApiApiCreateRelationshipRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return Relationship
|
||||
*/
|
||||
func (a *RelationshipApiService) CreateRelationshipExecute(r RelationshipApiApiCreateRelationshipRequest) (*Relationship, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *Relationship
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.CreateRelationship")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/admin/relation-tuples"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.createRelationshipBody
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type RelationshipApiApiDeleteRelationshipsRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
namespace *string
|
||||
object *string
|
||||
relation *string
|
||||
subjectId *string
|
||||
subjectSetNamespace *string
|
||||
subjectSetObject *string
|
||||
subjectSetRelation *string
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) Namespace(namespace string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.namespace = &namespace
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) Object(object string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.object = &object
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) Relation(relation string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.relation = &relation
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) SubjectId(subjectId string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.subjectId = &subjectId
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) SubjectSetNamespace(subjectSetNamespace string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.subjectSetNamespace = &subjectSetNamespace
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) SubjectSetObject(subjectSetObject string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.subjectSetObject = &subjectSetObject
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) SubjectSetRelation(subjectSetRelation string) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
r.subjectSetRelation = &subjectSetRelation
|
||||
return r
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiDeleteRelationshipsRequest) Execute() (*http.Response, error) {
|
||||
return r.ApiService.DeleteRelationshipsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* DeleteRelationships Delete Relationships
|
||||
* Use this endpoint to delete relationships
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiDeleteRelationshipsRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) DeleteRelationships(ctx context.Context) RelationshipApiApiDeleteRelationshipsRequest {
|
||||
return RelationshipApiApiDeleteRelationshipsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *RelationshipApiService) DeleteRelationshipsExecute(r RelationshipApiApiDeleteRelationshipsRequest) (*http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.DeleteRelationships")
|
||||
if err != nil {
|
||||
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/admin/relation-tuples"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.namespace != nil {
|
||||
localVarQueryParams.Add("namespace", parameterToString(*r.namespace, ""))
|
||||
}
|
||||
if r.object != nil {
|
||||
localVarQueryParams.Add("object", parameterToString(*r.object, ""))
|
||||
}
|
||||
if r.relation != nil {
|
||||
localVarQueryParams.Add("relation", parameterToString(*r.relation, ""))
|
||||
}
|
||||
if r.subjectId != nil {
|
||||
localVarQueryParams.Add("subject_id", parameterToString(*r.subjectId, ""))
|
||||
}
|
||||
if r.subjectSetNamespace != nil {
|
||||
localVarQueryParams.Add("subject_set.namespace", parameterToString(*r.subjectSetNamespace, ""))
|
||||
}
|
||||
if r.subjectSetObject != nil {
|
||||
localVarQueryParams.Add("subject_set.object", parameterToString(*r.subjectSetObject, ""))
|
||||
}
|
||||
if r.subjectSetRelation != nil {
|
||||
localVarQueryParams.Add("subject_set.relation", parameterToString(*r.subjectSetRelation, ""))
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type RelationshipApiApiGetRelationshipsRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
pageSize *int64
|
||||
pageToken *string
|
||||
namespace *string
|
||||
object *string
|
||||
relation *string
|
||||
subjectId *string
|
||||
subjectSetNamespace *string
|
||||
subjectSetObject *string
|
||||
subjectSetRelation *string
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) PageSize(pageSize int64) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.pageSize = &pageSize
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) PageToken(pageToken string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.pageToken = &pageToken
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) Namespace(namespace string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.namespace = &namespace
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) Object(object string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.object = &object
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) Relation(relation string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.relation = &relation
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) SubjectId(subjectId string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.subjectId = &subjectId
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) SubjectSetNamespace(subjectSetNamespace string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.subjectSetNamespace = &subjectSetNamespace
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) SubjectSetObject(subjectSetObject string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.subjectSetObject = &subjectSetObject
|
||||
return r
|
||||
}
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) SubjectSetRelation(subjectSetRelation string) RelationshipApiApiGetRelationshipsRequest {
|
||||
r.subjectSetRelation = &subjectSetRelation
|
||||
return r
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiGetRelationshipsRequest) Execute() (*Relationships, *http.Response, error) {
|
||||
return r.ApiService.GetRelationshipsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* GetRelationships Query relationships
|
||||
* Get all relationships that match the query. Only the namespace field is required.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiGetRelationshipsRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) GetRelationships(ctx context.Context) RelationshipApiApiGetRelationshipsRequest {
|
||||
return RelationshipApiApiGetRelationshipsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return Relationships
|
||||
*/
|
||||
func (a *RelationshipApiService) GetRelationshipsExecute(r RelationshipApiApiGetRelationshipsRequest) (*Relationships, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *Relationships
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.GetRelationships")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/relation-tuples"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
if r.pageSize != nil {
|
||||
localVarQueryParams.Add("page_size", parameterToString(*r.pageSize, ""))
|
||||
}
|
||||
if r.pageToken != nil {
|
||||
localVarQueryParams.Add("page_token", parameterToString(*r.pageToken, ""))
|
||||
}
|
||||
if r.namespace != nil {
|
||||
localVarQueryParams.Add("namespace", parameterToString(*r.namespace, ""))
|
||||
}
|
||||
if r.object != nil {
|
||||
localVarQueryParams.Add("object", parameterToString(*r.object, ""))
|
||||
}
|
||||
if r.relation != nil {
|
||||
localVarQueryParams.Add("relation", parameterToString(*r.relation, ""))
|
||||
}
|
||||
if r.subjectId != nil {
|
||||
localVarQueryParams.Add("subject_id", parameterToString(*r.subjectId, ""))
|
||||
}
|
||||
if r.subjectSetNamespace != nil {
|
||||
localVarQueryParams.Add("subject_set.namespace", parameterToString(*r.subjectSetNamespace, ""))
|
||||
}
|
||||
if r.subjectSetObject != nil {
|
||||
localVarQueryParams.Add("subject_set.object", parameterToString(*r.subjectSetObject, ""))
|
||||
}
|
||||
if r.subjectSetRelation != nil {
|
||||
localVarQueryParams.Add("subject_set.relation", parameterToString(*r.subjectSetRelation, ""))
|
||||
}
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 404 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type RelationshipApiApiListRelationshipNamespacesRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiListRelationshipNamespacesRequest) Execute() (*RelationshipNamespaces, *http.Response, error) {
|
||||
return r.ApiService.ListRelationshipNamespacesExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* ListRelationshipNamespaces Query namespaces
|
||||
* Get all namespaces
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiListRelationshipNamespacesRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) ListRelationshipNamespaces(ctx context.Context) RelationshipApiApiListRelationshipNamespacesRequest {
|
||||
return RelationshipApiApiListRelationshipNamespacesRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
* @return RelationshipNamespaces
|
||||
*/
|
||||
func (a *RelationshipApiService) ListRelationshipNamespacesExecute(r RelationshipApiApiListRelationshipNamespacesRequest) (*RelationshipNamespaces, *http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue *RelationshipNamespaces
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.ListRelationshipNamespaces")
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/namespaces"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarReturnValue, localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: err.Error(),
|
||||
}
|
||||
return localVarReturnValue, localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHTTPResponse, nil
|
||||
}
|
||||
|
||||
type RelationshipApiApiPatchRelationshipsRequest struct {
|
||||
ctx context.Context
|
||||
ApiService RelationshipApi
|
||||
relationshipPatch *[]RelationshipPatch
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiPatchRelationshipsRequest) RelationshipPatch(relationshipPatch []RelationshipPatch) RelationshipApiApiPatchRelationshipsRequest {
|
||||
r.relationshipPatch = &relationshipPatch
|
||||
return r
|
||||
}
|
||||
|
||||
func (r RelationshipApiApiPatchRelationshipsRequest) Execute() (*http.Response, error) {
|
||||
return r.ApiService.PatchRelationshipsExecute(r)
|
||||
}
|
||||
|
||||
/*
|
||||
* PatchRelationships Patch Multiple Relationships
|
||||
* Use this endpoint to patch one or more relationships.
|
||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||
* @return RelationshipApiApiPatchRelationshipsRequest
|
||||
*/
|
||||
func (a *RelationshipApiService) PatchRelationships(ctx context.Context) RelationshipApiApiPatchRelationshipsRequest {
|
||||
return RelationshipApiApiPatchRelationshipsRequest{
|
||||
ApiService: a,
|
||||
ctx: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Execute executes the request
|
||||
*/
|
||||
func (a *RelationshipApiService) PatchRelationshipsExecute(r RelationshipApiApiPatchRelationshipsRequest) (*http.Response, error) {
|
||||
var (
|
||||
localVarHTTPMethod = http.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "RelationshipApiService.PatchRelationships")
|
||||
if err != nil {
|
||||
return nil, &GenericOpenAPIError{error: err.Error()}
|
||||
}
|
||||
|
||||
localVarPath := localBasePath + "/admin/relation-tuples"
|
||||
|
||||
localVarHeaderParams := make(map[string]string)
|
||||
localVarQueryParams := url.Values{}
|
||||
localVarFormParams := url.Values{}
|
||||
|
||||
// to determine the Content-Type header
|
||||
localVarHTTPContentTypes := []string{"application/json"}
|
||||
|
||||
// set Content-Type header
|
||||
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
|
||||
if localVarHTTPContentType != "" {
|
||||
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
localVarHTTPHeaderAccepts := []string{"application/json"}
|
||||
|
||||
// set Accept header
|
||||
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
|
||||
if localVarHTTPHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = r.relationshipPatch
|
||||
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
localVarHTTPResponse, err := a.client.callAPI(req)
|
||||
if err != nil || localVarHTTPResponse == nil {
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
|
||||
localVarHTTPResponse.Body.Close()
|
||||
localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
|
||||
if err != nil {
|
||||
return localVarHTTPResponse, err
|
||||
}
|
||||
|
||||
if localVarHTTPResponse.StatusCode >= 300 {
|
||||
newErr := &GenericOpenAPIError{
|
||||
body: localVarBody,
|
||||
error: localVarHTTPResponse.Status,
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 400 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
if localVarHTTPResponse.StatusCode == 404 {
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
var v ErrorGeneric
|
||||
err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHTTPResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHTTPResponse, nil
|
||||
}
|
||||
547
internal/httpclient/client.go
generated
Normal file
547
internal/httpclient/client.go
generated
Normal file
@@ -0,0 +1,547 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
var (
|
||||
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||
)
|
||||
|
||||
// APIClient manages communication with the Ory Keto API API v
|
||||
// In most cases there should be only one, shared, APIClient.
|
||||
type APIClient struct {
|
||||
cfg *Configuration
|
||||
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||
|
||||
// API Services
|
||||
|
||||
MetadataApi MetadataApi
|
||||
|
||||
PermissionApi PermissionApi
|
||||
|
||||
RelationshipApi RelationshipApi
|
||||
}
|
||||
|
||||
type service struct {
|
||||
client *APIClient
|
||||
}
|
||||
|
||||
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
|
||||
// optionally a custom http.Client to allow for advanced features such as caching.
|
||||
func NewAPIClient(cfg *Configuration) *APIClient {
|
||||
if cfg.HTTPClient == nil {
|
||||
cfg.HTTPClient = http.DefaultClient
|
||||
}
|
||||
|
||||
c := &APIClient{}
|
||||
c.cfg = cfg
|
||||
c.common.client = c
|
||||
|
||||
// API Services
|
||||
c.MetadataApi = (*MetadataApiService)(&c.common)
|
||||
c.PermissionApi = (*PermissionApiService)(&c.common)
|
||||
c.RelationshipApi = (*RelationshipApiService)(&c.common)
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func atoi(in string) (int, error) {
|
||||
return strconv.Atoi(in)
|
||||
}
|
||||
|
||||
// selectHeaderContentType select a content type from the available list.
|
||||
func selectHeaderContentType(contentTypes []string) string {
|
||||
if len(contentTypes) == 0 {
|
||||
return ""
|
||||
}
|
||||
if contains(contentTypes, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||
}
|
||||
|
||||
// selectHeaderAccept join all accept types and return
|
||||
func selectHeaderAccept(accepts []string) string {
|
||||
if len(accepts) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if contains(accepts, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
|
||||
return strings.Join(accepts, ",")
|
||||
}
|
||||
|
||||
// contains is a case insenstive match, finding needle in a haystack
|
||||
func contains(haystack []string, needle string) bool {
|
||||
for _, a := range haystack {
|
||||
if strings.ToLower(a) == strings.ToLower(needle) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Verify optional parameters are of the correct type.
|
||||
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||
// Make sure there is an object.
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check the type is as expected.
|
||||
if reflect.TypeOf(obj).String() != expected {
|
||||
return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// parameterToString convert interface{} parameters to string, using a delimiter if format is provided.
|
||||
func parameterToString(obj interface{}, collectionFormat string) string {
|
||||
var delimiter string
|
||||
|
||||
switch collectionFormat {
|
||||
case "pipes":
|
||||
delimiter = "|"
|
||||
case "ssv":
|
||||
delimiter = " "
|
||||
case "tsv":
|
||||
delimiter = "\t"
|
||||
case "csv":
|
||||
delimiter = ","
|
||||
}
|
||||
|
||||
if reflect.TypeOf(obj).Kind() == reflect.Slice {
|
||||
return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]")
|
||||
} else if t, ok := obj.(time.Time); ok {
|
||||
return t.Format(time.RFC3339)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v", obj)
|
||||
}
|
||||
|
||||
// helper for converting interface{} parameters to json strings
|
||||
func parameterToJson(obj interface{}) (string, error) {
|
||||
jsonBuf, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBuf), err
|
||||
}
|
||||
|
||||
// callAPI do the request.
|
||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpRequestOut(request, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
|
||||
resp, err := c.cfg.HTTPClient.Do(request)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// Allow modification of underlying config for alternate implementations and testing
|
||||
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||
func (c *APIClient) GetConfig() *Configuration {
|
||||
return c.cfg
|
||||
}
|
||||
|
||||
// prepareRequest build the request
|
||||
func (c *APIClient) prepareRequest(
|
||||
ctx context.Context,
|
||||
path string, method string,
|
||||
postBody interface{},
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFileName string,
|
||||
fileName string,
|
||||
fileBytes []byte) (localVarRequest *http.Request, err error) {
|
||||
|
||||
var body *bytes.Buffer
|
||||
|
||||
// Detect postBody type and post.
|
||||
if postBody != nil {
|
||||
contentType := headerParams["Content-Type"]
|
||||
if contentType == "" {
|
||||
contentType = detectContentType(postBody)
|
||||
headerParams["Content-Type"] = contentType
|
||||
}
|
||||
|
||||
body, err = setBody(postBody, contentType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// add form parameters and file if available.
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
w := multipart.NewWriter(body)
|
||||
|
||||
for k, v := range formParams {
|
||||
for _, iv := range v {
|
||||
if strings.HasPrefix(k, "@") { // file
|
||||
err = addFile(w, k[1:], iv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else { // form value
|
||||
w.WriteField(k, iv)
|
||||
}
|
||||
}
|
||||
}
|
||||
if len(fileBytes) > 0 && fileName != "" {
|
||||
w.Boundary()
|
||||
//_, fileNm := filepath.Split(fileName)
|
||||
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err = part.Write(fileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
w.Close()
|
||||
}
|
||||
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||
if body != nil {
|
||||
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
body.WriteString(formParams.Encode())
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
}
|
||||
|
||||
// Setup path and query parameters
|
||||
url, err := url.Parse(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
url.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Override request scheme, if applicable
|
||||
if c.cfg.Scheme != "" {
|
||||
url.Scheme = c.cfg.Scheme
|
||||
}
|
||||
|
||||
// Adding Query Param
|
||||
query := url.Query()
|
||||
for k, v := range queryParams {
|
||||
for _, iv := range v {
|
||||
query.Add(k, iv)
|
||||
}
|
||||
}
|
||||
|
||||
// Encode the parameters.
|
||||
url.RawQuery = query.Encode()
|
||||
|
||||
// Generate a new request
|
||||
if body != nil {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||
} else {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// add header parameters, if any
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers.Set(h, v)
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
||||
// Add the user agent to the request.
|
||||
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||
|
||||
if ctx != nil {
|
||||
// add context to the request
|
||||
localVarRequest = localVarRequest.WithContext(ctx)
|
||||
|
||||
// Walk through any authentication.
|
||||
|
||||
// OAuth2 authentication
|
||||
if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok {
|
||||
// We were able to grab an oauth2 token from the context
|
||||
var latestToken *oauth2.Token
|
||||
if latestToken, err = tok.Token(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
latestToken.SetAuthHeader(localVarRequest)
|
||||
}
|
||||
|
||||
// Basic HTTP Authentication
|
||||
if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok {
|
||||
localVarRequest.SetBasicAuth(auth.UserName, auth.Password)
|
||||
}
|
||||
|
||||
// AccessToken Authentication
|
||||
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
|
||||
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for header, value := range c.cfg.DefaultHeader {
|
||||
localVarRequest.Header.Add(header, value)
|
||||
}
|
||||
return localVarRequest, nil
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if len(b) == 0 {
|
||||
return nil
|
||||
}
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if xmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if jsonCheck.MatchString(contentType) {
|
||||
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||
}
|
||||
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return errors.New("undefined response type")
|
||||
}
|
||||
|
||||
// Add a file to the multipart request
|
||||
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = io.Copy(part, file)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// Prevent trying to import "fmt"
|
||||
func reportError(format string, a ...interface{}) error {
|
||||
return fmt.Errorf(format, a...)
|
||||
}
|
||||
|
||||
// Prevent trying to import "bytes"
|
||||
func newStrictDecoder(data []byte) *json.Decoder {
|
||||
dec := json.NewDecoder(bytes.NewBuffer(data))
|
||||
dec.DisallowUnknownFields()
|
||||
return dec
|
||||
}
|
||||
|
||||
// Set request body from an interface{}
|
||||
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||
if bodyBuf == nil {
|
||||
bodyBuf = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
if reader, ok := body.(io.Reader); ok {
|
||||
_, err = bodyBuf.ReadFrom(reader)
|
||||
} else if b, ok := body.([]byte); ok {
|
||||
_, err = bodyBuf.Write(b)
|
||||
} else if s, ok := body.(string); ok {
|
||||
_, err = bodyBuf.WriteString(s)
|
||||
} else if s, ok := body.(*string); ok {
|
||||
_, err = bodyBuf.WriteString(*s)
|
||||
} else if jsonCheck.MatchString(contentType) {
|
||||
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||
} else if xmlCheck.MatchString(contentType) {
|
||||
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if bodyBuf.Len() == 0 {
|
||||
err = fmt.Errorf("Invalid body type %s\n", contentType)
|
||||
return nil, err
|
||||
}
|
||||
return bodyBuf, nil
|
||||
}
|
||||
|
||||
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||
func detectContentType(body interface{}) string {
|
||||
contentType := "text/plain; charset=utf-8"
|
||||
kind := reflect.TypeOf(body).Kind()
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||
contentType = "application/json; charset=utf-8"
|
||||
case reflect.String:
|
||||
contentType = "text/plain; charset=utf-8"
|
||||
default:
|
||||
if b, ok := body.([]byte); ok {
|
||||
contentType = http.DetectContentType(b)
|
||||
} else if kind == reflect.Slice {
|
||||
contentType = "application/json; charset=utf-8"
|
||||
}
|
||||
}
|
||||
|
||||
return contentType
|
||||
}
|
||||
|
||||
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||
type cacheControl map[string]string
|
||||
|
||||
func parseCacheControl(headers http.Header) cacheControl {
|
||||
cc := cacheControl{}
|
||||
ccHeader := headers.Get("Cache-Control")
|
||||
for _, part := range strings.Split(ccHeader, ",") {
|
||||
part = strings.Trim(part, " ")
|
||||
if part == "" {
|
||||
continue
|
||||
}
|
||||
if strings.ContainsRune(part, '=') {
|
||||
keyval := strings.Split(part, "=")
|
||||
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||
} else {
|
||||
cc[part] = ""
|
||||
}
|
||||
}
|
||||
return cc
|
||||
}
|
||||
|
||||
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||
func CacheExpires(r *http.Response) time.Time {
|
||||
// Figure out when the cache expires.
|
||||
var expires time.Time
|
||||
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||
if err != nil {
|
||||
return time.Now()
|
||||
}
|
||||
respCacheControl := parseCacheControl(r.Header)
|
||||
|
||||
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||
if err != nil {
|
||||
expires = now
|
||||
}
|
||||
}
|
||||
}
|
||||
return expires
|
||||
}
|
||||
|
||||
func strlen(s string) int {
|
||||
return utf8.RuneCountInString(s)
|
||||
}
|
||||
|
||||
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
|
||||
type GenericOpenAPIError struct {
|
||||
body []byte
|
||||
error string
|
||||
model interface{}
|
||||
}
|
||||
|
||||
// Error returns non-empty string if there was an error.
|
||||
func (e GenericOpenAPIError) Error() string {
|
||||
return e.error
|
||||
}
|
||||
|
||||
// Body returns the raw bytes of the response
|
||||
func (e GenericOpenAPIError) Body() []byte {
|
||||
return e.body
|
||||
}
|
||||
|
||||
// Model returns the unpacked model of the error
|
||||
func (e GenericOpenAPIError) Model() interface{} {
|
||||
return e.model
|
||||
}
|
||||
230
internal/httpclient/configuration.go
generated
Normal file
230
internal/httpclient/configuration.go
generated
Normal file
@@ -0,0 +1,230 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// contextKeys are used to identify the type of value in the context.
|
||||
// Since these are string, it is possible to get a short description of the
|
||||
// context key for logging and debugging using key.String().
|
||||
|
||||
type contextKey string
|
||||
|
||||
func (c contextKey) String() string {
|
||||
return "auth " + string(c)
|
||||
}
|
||||
|
||||
var (
|
||||
// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
|
||||
ContextOAuth2 = contextKey("token")
|
||||
|
||||
// ContextBasicAuth takes BasicAuth as authentication for the request.
|
||||
ContextBasicAuth = contextKey("basic")
|
||||
|
||||
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
|
||||
ContextAccessToken = contextKey("accesstoken")
|
||||
|
||||
// ContextAPIKeys takes a string apikey as authentication for the request
|
||||
ContextAPIKeys = contextKey("apiKeys")
|
||||
|
||||
// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
|
||||
ContextHttpSignatureAuth = contextKey("httpsignature")
|
||||
|
||||
// ContextServerIndex uses a server configuration from the index.
|
||||
ContextServerIndex = contextKey("serverIndex")
|
||||
|
||||
// ContextOperationServerIndices uses a server configuration from the index mapping.
|
||||
ContextOperationServerIndices = contextKey("serverOperationIndices")
|
||||
|
||||
// ContextServerVariables overrides a server configuration variables.
|
||||
ContextServerVariables = contextKey("serverVariables")
|
||||
|
||||
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
|
||||
ContextOperationServerVariables = contextKey("serverOperationVariables")
|
||||
)
|
||||
|
||||
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
|
||||
type BasicAuth struct {
|
||||
UserName string `json:"userName,omitempty"`
|
||||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
|
||||
type APIKey struct {
|
||||
Key string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// ServerVariable stores the information about a server variable
|
||||
type ServerVariable struct {
|
||||
Description string
|
||||
DefaultValue string
|
||||
EnumValues []string
|
||||
}
|
||||
|
||||
// ServerConfiguration stores the information about a server
|
||||
type ServerConfiguration struct {
|
||||
URL string
|
||||
Description string
|
||||
Variables map[string]ServerVariable
|
||||
}
|
||||
|
||||
// ServerConfigurations stores multiple ServerConfiguration items
|
||||
type ServerConfigurations []ServerConfiguration
|
||||
|
||||
// Configuration stores the configuration of the API client
|
||||
type Configuration struct {
|
||||
Host string `json:"host,omitempty"`
|
||||
Scheme string `json:"scheme,omitempty"`
|
||||
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
|
||||
UserAgent string `json:"userAgent,omitempty"`
|
||||
Debug bool `json:"debug,omitempty"`
|
||||
Servers ServerConfigurations
|
||||
OperationServers map[string]ServerConfigurations
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// NewConfiguration returns a new Configuration object
|
||||
func NewConfiguration() *Configuration {
|
||||
cfg := &Configuration{
|
||||
DefaultHeader: make(map[string]string),
|
||||
UserAgent: "OpenAPI-Generator/1.0.0/go",
|
||||
Debug: false,
|
||||
Servers: ServerConfigurations{
|
||||
{
|
||||
URL: "",
|
||||
Description: "No description provided",
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]ServerConfigurations{},
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
// AddDefaultHeader adds a new HTTP header to the default header in the request
|
||||
func (c *Configuration) AddDefaultHeader(key string, value string) {
|
||||
c.DefaultHeader[key] = value
|
||||
}
|
||||
|
||||
// URL formats template on a index using given variables
|
||||
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
|
||||
if index < 0 || len(sc) <= index {
|
||||
return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1)
|
||||
}
|
||||
server := sc[index]
|
||||
url := server.URL
|
||||
|
||||
// go through variables and replace placeholders
|
||||
for name, variable := range server.Variables {
|
||||
if value, ok := variables[name]; ok {
|
||||
found := bool(len(variable.EnumValues) == 0)
|
||||
for _, enumValue := range variable.EnumValues {
|
||||
if value == enumValue {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
|
||||
}
|
||||
url = strings.Replace(url, "{"+name+"}", value, -1)
|
||||
} else {
|
||||
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
|
||||
}
|
||||
}
|
||||
return url, nil
|
||||
}
|
||||
|
||||
// ServerURL returns URL based on server settings
|
||||
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
|
||||
return c.Servers.URL(index, variables)
|
||||
}
|
||||
|
||||
func getServerIndex(ctx context.Context) (int, error) {
|
||||
si := ctx.Value(ContextServerIndex)
|
||||
if si != nil {
|
||||
if index, ok := si.(int); ok {
|
||||
return index, nil
|
||||
}
|
||||
return 0, reportError("Invalid type %T should be int", si)
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
|
||||
osi := ctx.Value(ContextOperationServerIndices)
|
||||
if osi != nil {
|
||||
if operationIndices, ok := osi.(map[string]int); !ok {
|
||||
return 0, reportError("Invalid type %T should be map[string]int", osi)
|
||||
} else {
|
||||
index, ok := operationIndices[endpoint]
|
||||
if ok {
|
||||
return index, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerIndex(ctx)
|
||||
}
|
||||
|
||||
func getServerVariables(ctx context.Context) (map[string]string, error) {
|
||||
sv := ctx.Value(ContextServerVariables)
|
||||
if sv != nil {
|
||||
if variables, ok := sv.(map[string]string); ok {
|
||||
return variables, nil
|
||||
}
|
||||
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
|
||||
osv := ctx.Value(ContextOperationServerVariables)
|
||||
if osv != nil {
|
||||
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
|
||||
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
|
||||
} else {
|
||||
variables, ok := operationVariables[endpoint]
|
||||
if ok {
|
||||
return variables, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return getServerVariables(ctx)
|
||||
}
|
||||
|
||||
// ServerURLWithContext returns a new server URL given an endpoint
|
||||
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
|
||||
sc, ok := c.OperationServers[endpoint]
|
||||
if !ok {
|
||||
sc = c.Servers
|
||||
}
|
||||
|
||||
if ctx == nil {
|
||||
return sc.URL(0, nil)
|
||||
}
|
||||
|
||||
index, err := getServerOperationIndex(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
variables, err := getServerOperationVariables(ctx, endpoint)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return sc.URL(index, variables)
|
||||
}
|
||||
56
internal/httpclient/docs/BatchCheckPermissionBody.md
generated
Normal file
56
internal/httpclient/docs/BatchCheckPermissionBody.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# BatchCheckPermissionBody
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Tuples** | Pointer to [**[]Relationship**](Relationship.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewBatchCheckPermissionBody
|
||||
|
||||
`func NewBatchCheckPermissionBody() *BatchCheckPermissionBody`
|
||||
|
||||
NewBatchCheckPermissionBody instantiates a new BatchCheckPermissionBody object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewBatchCheckPermissionBodyWithDefaults
|
||||
|
||||
`func NewBatchCheckPermissionBodyWithDefaults() *BatchCheckPermissionBody`
|
||||
|
||||
NewBatchCheckPermissionBodyWithDefaults instantiates a new BatchCheckPermissionBody object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetTuples
|
||||
|
||||
`func (o *BatchCheckPermissionBody) GetTuples() []Relationship`
|
||||
|
||||
GetTuples returns the Tuples field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTuplesOk
|
||||
|
||||
`func (o *BatchCheckPermissionBody) GetTuplesOk() (*[]Relationship, bool)`
|
||||
|
||||
GetTuplesOk returns a tuple with the Tuples field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetTuples
|
||||
|
||||
`func (o *BatchCheckPermissionBody) SetTuples(v []Relationship)`
|
||||
|
||||
SetTuples sets Tuples field to given value.
|
||||
|
||||
### HasTuples
|
||||
|
||||
`func (o *BatchCheckPermissionBody) HasTuples() bool`
|
||||
|
||||
HasTuples returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/BatchCheckPermissionResult.md
generated
Normal file
51
internal/httpclient/docs/BatchCheckPermissionResult.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# BatchCheckPermissionResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Results** | [**[]CheckPermissionResultWithError**](CheckPermissionResultWithError.md) | An array of check results. The order aligns with the input order. |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewBatchCheckPermissionResult
|
||||
|
||||
`func NewBatchCheckPermissionResult(results []CheckPermissionResultWithError, ) *BatchCheckPermissionResult`
|
||||
|
||||
NewBatchCheckPermissionResult instantiates a new BatchCheckPermissionResult object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewBatchCheckPermissionResultWithDefaults
|
||||
|
||||
`func NewBatchCheckPermissionResultWithDefaults() *BatchCheckPermissionResult`
|
||||
|
||||
NewBatchCheckPermissionResultWithDefaults instantiates a new BatchCheckPermissionResult object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetResults
|
||||
|
||||
`func (o *BatchCheckPermissionResult) GetResults() []CheckPermissionResultWithError`
|
||||
|
||||
GetResults returns the Results field if non-nil, zero value otherwise.
|
||||
|
||||
### GetResultsOk
|
||||
|
||||
`func (o *BatchCheckPermissionResult) GetResultsOk() (*[]CheckPermissionResultWithError, bool)`
|
||||
|
||||
GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetResults
|
||||
|
||||
`func (o *BatchCheckPermissionResult) SetResults(v []CheckPermissionResultWithError)`
|
||||
|
||||
SetResults sets Results field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
56
internal/httpclient/docs/CheckOplSyntaxResult.md
generated
Normal file
56
internal/httpclient/docs/CheckOplSyntaxResult.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# CheckOplSyntaxResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Errors** | Pointer to [**[]ParseError**](ParseError.md) | The list of syntax errors | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCheckOplSyntaxResult
|
||||
|
||||
`func NewCheckOplSyntaxResult() *CheckOplSyntaxResult`
|
||||
|
||||
NewCheckOplSyntaxResult instantiates a new CheckOplSyntaxResult object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCheckOplSyntaxResultWithDefaults
|
||||
|
||||
`func NewCheckOplSyntaxResultWithDefaults() *CheckOplSyntaxResult`
|
||||
|
||||
NewCheckOplSyntaxResultWithDefaults instantiates a new CheckOplSyntaxResult object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetErrors
|
||||
|
||||
`func (o *CheckOplSyntaxResult) GetErrors() []ParseError`
|
||||
|
||||
GetErrors returns the Errors field if non-nil, zero value otherwise.
|
||||
|
||||
### GetErrorsOk
|
||||
|
||||
`func (o *CheckOplSyntaxResult) GetErrorsOk() (*[]ParseError, bool)`
|
||||
|
||||
GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetErrors
|
||||
|
||||
`func (o *CheckOplSyntaxResult) SetErrors(v []ParseError)`
|
||||
|
||||
SetErrors sets Errors field to given value.
|
||||
|
||||
### HasErrors
|
||||
|
||||
`func (o *CheckOplSyntaxResult) HasErrors() bool`
|
||||
|
||||
HasErrors returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/CheckPermissionResult.md
generated
Normal file
51
internal/httpclient/docs/CheckPermissionResult.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# CheckPermissionResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Allowed** | **bool** | whether the relation tuple is allowed |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCheckPermissionResult
|
||||
|
||||
`func NewCheckPermissionResult(allowed bool, ) *CheckPermissionResult`
|
||||
|
||||
NewCheckPermissionResult instantiates a new CheckPermissionResult object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCheckPermissionResultWithDefaults
|
||||
|
||||
`func NewCheckPermissionResultWithDefaults() *CheckPermissionResult`
|
||||
|
||||
NewCheckPermissionResultWithDefaults instantiates a new CheckPermissionResult object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetAllowed
|
||||
|
||||
`func (o *CheckPermissionResult) GetAllowed() bool`
|
||||
|
||||
GetAllowed returns the Allowed field if non-nil, zero value otherwise.
|
||||
|
||||
### GetAllowedOk
|
||||
|
||||
`func (o *CheckPermissionResult) GetAllowedOk() (*bool, bool)`
|
||||
|
||||
GetAllowedOk returns a tuple with the Allowed field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetAllowed
|
||||
|
||||
`func (o *CheckPermissionResult) SetAllowed(v bool)`
|
||||
|
||||
SetAllowed sets Allowed field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
77
internal/httpclient/docs/CheckPermissionResultWithError.md
generated
Normal file
77
internal/httpclient/docs/CheckPermissionResultWithError.md
generated
Normal file
@@ -0,0 +1,77 @@
|
||||
# CheckPermissionResultWithError
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Allowed** | **bool** | whether the relation tuple is allowed |
|
||||
**Error** | Pointer to **string** | any error generated while checking the relation tuple | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCheckPermissionResultWithError
|
||||
|
||||
`func NewCheckPermissionResultWithError(allowed bool, ) *CheckPermissionResultWithError`
|
||||
|
||||
NewCheckPermissionResultWithError instantiates a new CheckPermissionResultWithError object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCheckPermissionResultWithErrorWithDefaults
|
||||
|
||||
`func NewCheckPermissionResultWithErrorWithDefaults() *CheckPermissionResultWithError`
|
||||
|
||||
NewCheckPermissionResultWithErrorWithDefaults instantiates a new CheckPermissionResultWithError object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetAllowed
|
||||
|
||||
`func (o *CheckPermissionResultWithError) GetAllowed() bool`
|
||||
|
||||
GetAllowed returns the Allowed field if non-nil, zero value otherwise.
|
||||
|
||||
### GetAllowedOk
|
||||
|
||||
`func (o *CheckPermissionResultWithError) GetAllowedOk() (*bool, bool)`
|
||||
|
||||
GetAllowedOk returns a tuple with the Allowed field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetAllowed
|
||||
|
||||
`func (o *CheckPermissionResultWithError) SetAllowed(v bool)`
|
||||
|
||||
SetAllowed sets Allowed field to given value.
|
||||
|
||||
|
||||
### GetError
|
||||
|
||||
`func (o *CheckPermissionResultWithError) GetError() string`
|
||||
|
||||
GetError returns the Error field if non-nil, zero value otherwise.
|
||||
|
||||
### GetErrorOk
|
||||
|
||||
`func (o *CheckPermissionResultWithError) GetErrorOk() (*string, bool)`
|
||||
|
||||
GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetError
|
||||
|
||||
`func (o *CheckPermissionResultWithError) SetError(v string)`
|
||||
|
||||
SetError sets Error field to given value.
|
||||
|
||||
### HasError
|
||||
|
||||
`func (o *CheckPermissionResultWithError) HasError() bool`
|
||||
|
||||
HasError returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
160
internal/httpclient/docs/CreateRelationshipBody.md
generated
Normal file
160
internal/httpclient/docs/CreateRelationshipBody.md
generated
Normal file
@@ -0,0 +1,160 @@
|
||||
# CreateRelationshipBody
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | Pointer to **string** | Namespace to query | [optional]
|
||||
**Object** | Pointer to **string** | Object to query | [optional]
|
||||
**Relation** | Pointer to **string** | Relation to query | [optional]
|
||||
**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional]
|
||||
**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewCreateRelationshipBody
|
||||
|
||||
`func NewCreateRelationshipBody() *CreateRelationshipBody`
|
||||
|
||||
NewCreateRelationshipBody instantiates a new CreateRelationshipBody object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewCreateRelationshipBodyWithDefaults
|
||||
|
||||
`func NewCreateRelationshipBodyWithDefaults() *CreateRelationshipBody`
|
||||
|
||||
NewCreateRelationshipBodyWithDefaults instantiates a new CreateRelationshipBody object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *CreateRelationshipBody) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *CreateRelationshipBody) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *CreateRelationshipBody) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
### HasNamespace
|
||||
|
||||
`func (o *CreateRelationshipBody) HasNamespace() bool`
|
||||
|
||||
HasNamespace returns a boolean if a field has been set.
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *CreateRelationshipBody) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *CreateRelationshipBody) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *CreateRelationshipBody) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
### HasObject
|
||||
|
||||
`func (o *CreateRelationshipBody) HasObject() bool`
|
||||
|
||||
HasObject returns a boolean if a field has been set.
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *CreateRelationshipBody) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *CreateRelationshipBody) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *CreateRelationshipBody) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
### HasRelation
|
||||
|
||||
`func (o *CreateRelationshipBody) HasRelation() bool`
|
||||
|
||||
HasRelation returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectId
|
||||
|
||||
`func (o *CreateRelationshipBody) GetSubjectId() string`
|
||||
|
||||
GetSubjectId returns the SubjectId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectIdOk
|
||||
|
||||
`func (o *CreateRelationshipBody) GetSubjectIdOk() (*string, bool)`
|
||||
|
||||
GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectId
|
||||
|
||||
`func (o *CreateRelationshipBody) SetSubjectId(v string)`
|
||||
|
||||
SetSubjectId sets SubjectId field to given value.
|
||||
|
||||
### HasSubjectId
|
||||
|
||||
`func (o *CreateRelationshipBody) HasSubjectId() bool`
|
||||
|
||||
HasSubjectId returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectSet
|
||||
|
||||
`func (o *CreateRelationshipBody) GetSubjectSet() SubjectSet`
|
||||
|
||||
GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectSetOk
|
||||
|
||||
`func (o *CreateRelationshipBody) GetSubjectSetOk() (*SubjectSet, bool)`
|
||||
|
||||
GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectSet
|
||||
|
||||
`func (o *CreateRelationshipBody) SetSubjectSet(v SubjectSet)`
|
||||
|
||||
SetSubjectSet sets SubjectSet field to given value.
|
||||
|
||||
### HasSubjectSet
|
||||
|
||||
`func (o *CreateRelationshipBody) HasSubjectSet() bool`
|
||||
|
||||
HasSubjectSet returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/ErrorGeneric.md
generated
Normal file
51
internal/httpclient/docs/ErrorGeneric.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# ErrorGeneric
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Error** | [**GenericError**](GenericError.md) | |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewErrorGeneric
|
||||
|
||||
`func NewErrorGeneric(error_ GenericError, ) *ErrorGeneric`
|
||||
|
||||
NewErrorGeneric instantiates a new ErrorGeneric object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewErrorGenericWithDefaults
|
||||
|
||||
`func NewErrorGenericWithDefaults() *ErrorGeneric`
|
||||
|
||||
NewErrorGenericWithDefaults instantiates a new ErrorGeneric object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetError
|
||||
|
||||
`func (o *ErrorGeneric) GetError() GenericError`
|
||||
|
||||
GetError returns the Error field if non-nil, zero value otherwise.
|
||||
|
||||
### GetErrorOk
|
||||
|
||||
`func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool)`
|
||||
|
||||
GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetError
|
||||
|
||||
`func (o *ErrorGeneric) SetError(v GenericError)`
|
||||
|
||||
SetError sets Error field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
103
internal/httpclient/docs/ExpandedPermissionTree.md
generated
Normal file
103
internal/httpclient/docs/ExpandedPermissionTree.md
generated
Normal file
@@ -0,0 +1,103 @@
|
||||
# ExpandedPermissionTree
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Children** | Pointer to [**[]ExpandedPermissionTree**](ExpandedPermissionTree.md) | The children of the node, possibly none. | [optional]
|
||||
**Tuple** | Pointer to [**Relationship**](Relationship.md) | | [optional]
|
||||
**Type** | **string** | The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewExpandedPermissionTree
|
||||
|
||||
`func NewExpandedPermissionTree(type_ string, ) *ExpandedPermissionTree`
|
||||
|
||||
NewExpandedPermissionTree instantiates a new ExpandedPermissionTree object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewExpandedPermissionTreeWithDefaults
|
||||
|
||||
`func NewExpandedPermissionTreeWithDefaults() *ExpandedPermissionTree`
|
||||
|
||||
NewExpandedPermissionTreeWithDefaults instantiates a new ExpandedPermissionTree object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetChildren
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetChildren() []ExpandedPermissionTree`
|
||||
|
||||
GetChildren returns the Children field if non-nil, zero value otherwise.
|
||||
|
||||
### GetChildrenOk
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetChildrenOk() (*[]ExpandedPermissionTree, bool)`
|
||||
|
||||
GetChildrenOk returns a tuple with the Children field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetChildren
|
||||
|
||||
`func (o *ExpandedPermissionTree) SetChildren(v []ExpandedPermissionTree)`
|
||||
|
||||
SetChildren sets Children field to given value.
|
||||
|
||||
### HasChildren
|
||||
|
||||
`func (o *ExpandedPermissionTree) HasChildren() bool`
|
||||
|
||||
HasChildren returns a boolean if a field has been set.
|
||||
|
||||
### GetTuple
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetTuple() Relationship`
|
||||
|
||||
GetTuple returns the Tuple field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTupleOk
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetTupleOk() (*Relationship, bool)`
|
||||
|
||||
GetTupleOk returns a tuple with the Tuple field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetTuple
|
||||
|
||||
`func (o *ExpandedPermissionTree) SetTuple(v Relationship)`
|
||||
|
||||
SetTuple sets Tuple field to given value.
|
||||
|
||||
### HasTuple
|
||||
|
||||
`func (o *ExpandedPermissionTree) HasTuple() bool`
|
||||
|
||||
HasTuple returns a boolean if a field has been set.
|
||||
|
||||
### GetType
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetType() string`
|
||||
|
||||
GetType returns the Type field if non-nil, zero value otherwise.
|
||||
|
||||
### GetTypeOk
|
||||
|
||||
`func (o *ExpandedPermissionTree) GetTypeOk() (*string, bool)`
|
||||
|
||||
GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetType
|
||||
|
||||
`func (o *ExpandedPermissionTree) SetType(v string)`
|
||||
|
||||
SetType sets Type field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
233
internal/httpclient/docs/GenericError.md
generated
Normal file
233
internal/httpclient/docs/GenericError.md
generated
Normal file
@@ -0,0 +1,233 @@
|
||||
# GenericError
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | Pointer to **int64** | The status code | [optional]
|
||||
**Debug** | Pointer to **string** | Debug information This field is often not exposed to protect against leaking sensitive information. | [optional]
|
||||
**Details** | Pointer to **map[string]interface{}** | Further error details | [optional]
|
||||
**Id** | Pointer to **string** | The error ID Useful when trying to identify various errors in application logic. | [optional]
|
||||
**Message** | **string** | Error message The error's message. |
|
||||
**Reason** | Pointer to **string** | A human-readable reason for the error | [optional]
|
||||
**Request** | Pointer to **string** | The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID. | [optional]
|
||||
**Status** | Pointer to **string** | The status description | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewGenericError
|
||||
|
||||
`func NewGenericError(message string, ) *GenericError`
|
||||
|
||||
NewGenericError instantiates a new GenericError object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewGenericErrorWithDefaults
|
||||
|
||||
`func NewGenericErrorWithDefaults() *GenericError`
|
||||
|
||||
NewGenericErrorWithDefaults instantiates a new GenericError object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetCode
|
||||
|
||||
`func (o *GenericError) GetCode() int64`
|
||||
|
||||
GetCode returns the Code field if non-nil, zero value otherwise.
|
||||
|
||||
### GetCodeOk
|
||||
|
||||
`func (o *GenericError) GetCodeOk() (*int64, bool)`
|
||||
|
||||
GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetCode
|
||||
|
||||
`func (o *GenericError) SetCode(v int64)`
|
||||
|
||||
SetCode sets Code field to given value.
|
||||
|
||||
### HasCode
|
||||
|
||||
`func (o *GenericError) HasCode() bool`
|
||||
|
||||
HasCode returns a boolean if a field has been set.
|
||||
|
||||
### GetDebug
|
||||
|
||||
`func (o *GenericError) GetDebug() string`
|
||||
|
||||
GetDebug returns the Debug field if non-nil, zero value otherwise.
|
||||
|
||||
### GetDebugOk
|
||||
|
||||
`func (o *GenericError) GetDebugOk() (*string, bool)`
|
||||
|
||||
GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetDebug
|
||||
|
||||
`func (o *GenericError) SetDebug(v string)`
|
||||
|
||||
SetDebug sets Debug field to given value.
|
||||
|
||||
### HasDebug
|
||||
|
||||
`func (o *GenericError) HasDebug() bool`
|
||||
|
||||
HasDebug returns a boolean if a field has been set.
|
||||
|
||||
### GetDetails
|
||||
|
||||
`func (o *GenericError) GetDetails() map[string]interface{}`
|
||||
|
||||
GetDetails returns the Details field if non-nil, zero value otherwise.
|
||||
|
||||
### GetDetailsOk
|
||||
|
||||
`func (o *GenericError) GetDetailsOk() (*map[string]interface{}, bool)`
|
||||
|
||||
GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetDetails
|
||||
|
||||
`func (o *GenericError) SetDetails(v map[string]interface{})`
|
||||
|
||||
SetDetails sets Details field to given value.
|
||||
|
||||
### HasDetails
|
||||
|
||||
`func (o *GenericError) HasDetails() bool`
|
||||
|
||||
HasDetails returns a boolean if a field has been set.
|
||||
|
||||
### GetId
|
||||
|
||||
`func (o *GenericError) GetId() string`
|
||||
|
||||
GetId returns the Id field if non-nil, zero value otherwise.
|
||||
|
||||
### GetIdOk
|
||||
|
||||
`func (o *GenericError) GetIdOk() (*string, bool)`
|
||||
|
||||
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetId
|
||||
|
||||
`func (o *GenericError) SetId(v string)`
|
||||
|
||||
SetId sets Id field to given value.
|
||||
|
||||
### HasId
|
||||
|
||||
`func (o *GenericError) HasId() bool`
|
||||
|
||||
HasId returns a boolean if a field has been set.
|
||||
|
||||
### GetMessage
|
||||
|
||||
`func (o *GenericError) GetMessage() string`
|
||||
|
||||
GetMessage returns the Message field if non-nil, zero value otherwise.
|
||||
|
||||
### GetMessageOk
|
||||
|
||||
`func (o *GenericError) GetMessageOk() (*string, bool)`
|
||||
|
||||
GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetMessage
|
||||
|
||||
`func (o *GenericError) SetMessage(v string)`
|
||||
|
||||
SetMessage sets Message field to given value.
|
||||
|
||||
|
||||
### GetReason
|
||||
|
||||
`func (o *GenericError) GetReason() string`
|
||||
|
||||
GetReason returns the Reason field if non-nil, zero value otherwise.
|
||||
|
||||
### GetReasonOk
|
||||
|
||||
`func (o *GenericError) GetReasonOk() (*string, bool)`
|
||||
|
||||
GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetReason
|
||||
|
||||
`func (o *GenericError) SetReason(v string)`
|
||||
|
||||
SetReason sets Reason field to given value.
|
||||
|
||||
### HasReason
|
||||
|
||||
`func (o *GenericError) HasReason() bool`
|
||||
|
||||
HasReason returns a boolean if a field has been set.
|
||||
|
||||
### GetRequest
|
||||
|
||||
`func (o *GenericError) GetRequest() string`
|
||||
|
||||
GetRequest returns the Request field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRequestOk
|
||||
|
||||
`func (o *GenericError) GetRequestOk() (*string, bool)`
|
||||
|
||||
GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRequest
|
||||
|
||||
`func (o *GenericError) SetRequest(v string)`
|
||||
|
||||
SetRequest sets Request field to given value.
|
||||
|
||||
### HasRequest
|
||||
|
||||
`func (o *GenericError) HasRequest() bool`
|
||||
|
||||
HasRequest returns a boolean if a field has been set.
|
||||
|
||||
### GetStatus
|
||||
|
||||
`func (o *GenericError) GetStatus() string`
|
||||
|
||||
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||
|
||||
### GetStatusOk
|
||||
|
||||
`func (o *GenericError) GetStatusOk() (*string, bool)`
|
||||
|
||||
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetStatus
|
||||
|
||||
`func (o *GenericError) SetStatus(v string)`
|
||||
|
||||
SetStatus sets Status field to given value.
|
||||
|
||||
### HasStatus
|
||||
|
||||
`func (o *GenericError) HasStatus() bool`
|
||||
|
||||
HasStatus returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/GetVersion200Response.md
generated
Normal file
51
internal/httpclient/docs/GetVersion200Response.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# GetVersion200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Version** | **string** | The version of Ory Keto. |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewGetVersion200Response
|
||||
|
||||
`func NewGetVersion200Response(version string, ) *GetVersion200Response`
|
||||
|
||||
NewGetVersion200Response instantiates a new GetVersion200Response object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewGetVersion200ResponseWithDefaults
|
||||
|
||||
`func NewGetVersion200ResponseWithDefaults() *GetVersion200Response`
|
||||
|
||||
NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetVersion
|
||||
|
||||
`func (o *GetVersion200Response) GetVersion() string`
|
||||
|
||||
GetVersion returns the Version field if non-nil, zero value otherwise.
|
||||
|
||||
### GetVersionOk
|
||||
|
||||
`func (o *GetVersion200Response) GetVersionOk() (*string, bool)`
|
||||
|
||||
GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetVersion
|
||||
|
||||
`func (o *GetVersion200Response) SetVersion(v string)`
|
||||
|
||||
SetVersion sets Version field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
56
internal/httpclient/docs/HealthNotReadyStatus.md
generated
Normal file
56
internal/httpclient/docs/HealthNotReadyStatus.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# HealthNotReadyStatus
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Errors** | Pointer to **map[string]string** | Errors contains a list of errors that caused the not ready status. | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewHealthNotReadyStatus
|
||||
|
||||
`func NewHealthNotReadyStatus() *HealthNotReadyStatus`
|
||||
|
||||
NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewHealthNotReadyStatusWithDefaults
|
||||
|
||||
`func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus`
|
||||
|
||||
NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetErrors
|
||||
|
||||
`func (o *HealthNotReadyStatus) GetErrors() map[string]string`
|
||||
|
||||
GetErrors returns the Errors field if non-nil, zero value otherwise.
|
||||
|
||||
### GetErrorsOk
|
||||
|
||||
`func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool)`
|
||||
|
||||
GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetErrors
|
||||
|
||||
`func (o *HealthNotReadyStatus) SetErrors(v map[string]string)`
|
||||
|
||||
SetErrors sets Errors field to given value.
|
||||
|
||||
### HasErrors
|
||||
|
||||
`func (o *HealthNotReadyStatus) HasErrors() bool`
|
||||
|
||||
HasErrors returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
56
internal/httpclient/docs/HealthStatus.md
generated
Normal file
56
internal/httpclient/docs/HealthStatus.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# HealthStatus
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Status** | Pointer to **string** | Status always contains \"ok\". | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewHealthStatus
|
||||
|
||||
`func NewHealthStatus() *HealthStatus`
|
||||
|
||||
NewHealthStatus instantiates a new HealthStatus object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewHealthStatusWithDefaults
|
||||
|
||||
`func NewHealthStatusWithDefaults() *HealthStatus`
|
||||
|
||||
NewHealthStatusWithDefaults instantiates a new HealthStatus object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetStatus
|
||||
|
||||
`func (o *HealthStatus) GetStatus() string`
|
||||
|
||||
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||
|
||||
### GetStatusOk
|
||||
|
||||
`func (o *HealthStatus) GetStatusOk() (*string, bool)`
|
||||
|
||||
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetStatus
|
||||
|
||||
`func (o *HealthStatus) SetStatus(v string)`
|
||||
|
||||
SetStatus sets Status field to given value.
|
||||
|
||||
### HasStatus
|
||||
|
||||
`func (o *HealthStatus) HasStatus() bool`
|
||||
|
||||
HasStatus returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/IsAlive200Response.md
generated
Normal file
51
internal/httpclient/docs/IsAlive200Response.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# IsAlive200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Status** | **string** | Always \"ok\". |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewIsAlive200Response
|
||||
|
||||
`func NewIsAlive200Response(status string, ) *IsAlive200Response`
|
||||
|
||||
NewIsAlive200Response instantiates a new IsAlive200Response object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewIsAlive200ResponseWithDefaults
|
||||
|
||||
`func NewIsAlive200ResponseWithDefaults() *IsAlive200Response`
|
||||
|
||||
NewIsAlive200ResponseWithDefaults instantiates a new IsAlive200Response object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetStatus
|
||||
|
||||
`func (o *IsAlive200Response) GetStatus() string`
|
||||
|
||||
GetStatus returns the Status field if non-nil, zero value otherwise.
|
||||
|
||||
### GetStatusOk
|
||||
|
||||
`func (o *IsAlive200Response) GetStatusOk() (*string, bool)`
|
||||
|
||||
GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetStatus
|
||||
|
||||
`func (o *IsAlive200Response) SetStatus(v string)`
|
||||
|
||||
SetStatus sets Status field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
51
internal/httpclient/docs/IsReady503Response.md
generated
Normal file
51
internal/httpclient/docs/IsReady503Response.md
generated
Normal file
@@ -0,0 +1,51 @@
|
||||
# IsReady503Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Errors** | **map[string]string** | Errors contains a list of errors that caused the not ready status. |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewIsReady503Response
|
||||
|
||||
`func NewIsReady503Response(errors map[string]string, ) *IsReady503Response`
|
||||
|
||||
NewIsReady503Response instantiates a new IsReady503Response object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewIsReady503ResponseWithDefaults
|
||||
|
||||
`func NewIsReady503ResponseWithDefaults() *IsReady503Response`
|
||||
|
||||
NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetErrors
|
||||
|
||||
`func (o *IsReady503Response) GetErrors() map[string]string`
|
||||
|
||||
GetErrors returns the Errors field if non-nil, zero value otherwise.
|
||||
|
||||
### GetErrorsOk
|
||||
|
||||
`func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool)`
|
||||
|
||||
GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetErrors
|
||||
|
||||
`func (o *IsReady503Response) SetErrors(v map[string]string)`
|
||||
|
||||
SetErrors sets Errors field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
194
internal/httpclient/docs/MetadataApi.md
generated
Normal file
194
internal/httpclient/docs/MetadataApi.md
generated
Normal file
@@ -0,0 +1,194 @@
|
||||
# \MetadataApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**GetVersion**](MetadataApi.md#GetVersion) | **Get** /version | Return Running Software Version.
|
||||
[**IsAlive**](MetadataApi.md#IsAlive) | **Get** /health/alive | Check HTTP Server Status
|
||||
[**IsReady**](MetadataApi.md#IsReady) | **Get** /health/ready | Check HTTP Server and Database Status
|
||||
|
||||
|
||||
|
||||
## GetVersion
|
||||
|
||||
> GetVersion200Response GetVersion(ctx).Execute()
|
||||
|
||||
Return Running Software Version.
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.MetadataApi.GetVersion(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.GetVersion``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetVersion`: GetVersion200Response
|
||||
fmt.Fprintf(os.Stdout, "Response from `MetadataApi.GetVersion`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetVersionRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
[**GetVersion200Response**](GetVersion200Response.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## IsAlive
|
||||
|
||||
> IsAlive200Response IsAlive(ctx).Execute()
|
||||
|
||||
Check HTTP Server Status
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.MetadataApi.IsAlive(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.IsAlive``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `IsAlive`: IsAlive200Response
|
||||
fmt.Fprintf(os.Stdout, "Response from `MetadataApi.IsAlive`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiIsAliveRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
[**IsAlive200Response**](IsAlive200Response.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, text/plain
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## IsReady
|
||||
|
||||
> IsAlive200Response IsReady(ctx).Execute()
|
||||
|
||||
Check HTTP Server and Database Status
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.MetadataApi.IsReady(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `MetadataApi.IsReady``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `IsReady`: IsAlive200Response
|
||||
fmt.Fprintf(os.Stdout, "Response from `MetadataApi.IsReady`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiIsReadyRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
[**IsAlive200Response**](IsAlive200Response.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, text/plain
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
56
internal/httpclient/docs/Namespace.md
generated
Normal file
56
internal/httpclient/docs/Namespace.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# Namespace
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | Pointer to **string** | Name of the namespace. | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewNamespace
|
||||
|
||||
`func NewNamespace() *Namespace`
|
||||
|
||||
NewNamespace instantiates a new Namespace object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewNamespaceWithDefaults
|
||||
|
||||
`func NewNamespaceWithDefaults() *Namespace`
|
||||
|
||||
NewNamespaceWithDefaults instantiates a new Namespace object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetName
|
||||
|
||||
`func (o *Namespace) GetName() string`
|
||||
|
||||
GetName returns the Name field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNameOk
|
||||
|
||||
`func (o *Namespace) GetNameOk() (*string, bool)`
|
||||
|
||||
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetName
|
||||
|
||||
`func (o *Namespace) SetName(v string)`
|
||||
|
||||
SetName sets Name field to given value.
|
||||
|
||||
### HasName
|
||||
|
||||
`func (o *Namespace) HasName() bool`
|
||||
|
||||
HasName returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
108
internal/httpclient/docs/ParseError.md
generated
Normal file
108
internal/httpclient/docs/ParseError.md
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
# ParseError
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**End** | Pointer to [**SourcePosition**](SourcePosition.md) | | [optional]
|
||||
**Message** | Pointer to **string** | | [optional]
|
||||
**Start** | Pointer to [**SourcePosition**](SourcePosition.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewParseError
|
||||
|
||||
`func NewParseError() *ParseError`
|
||||
|
||||
NewParseError instantiates a new ParseError object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewParseErrorWithDefaults
|
||||
|
||||
`func NewParseErrorWithDefaults() *ParseError`
|
||||
|
||||
NewParseErrorWithDefaults instantiates a new ParseError object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetEnd
|
||||
|
||||
`func (o *ParseError) GetEnd() SourcePosition`
|
||||
|
||||
GetEnd returns the End field if non-nil, zero value otherwise.
|
||||
|
||||
### GetEndOk
|
||||
|
||||
`func (o *ParseError) GetEndOk() (*SourcePosition, bool)`
|
||||
|
||||
GetEndOk returns a tuple with the End field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetEnd
|
||||
|
||||
`func (o *ParseError) SetEnd(v SourcePosition)`
|
||||
|
||||
SetEnd sets End field to given value.
|
||||
|
||||
### HasEnd
|
||||
|
||||
`func (o *ParseError) HasEnd() bool`
|
||||
|
||||
HasEnd returns a boolean if a field has been set.
|
||||
|
||||
### GetMessage
|
||||
|
||||
`func (o *ParseError) GetMessage() string`
|
||||
|
||||
GetMessage returns the Message field if non-nil, zero value otherwise.
|
||||
|
||||
### GetMessageOk
|
||||
|
||||
`func (o *ParseError) GetMessageOk() (*string, bool)`
|
||||
|
||||
GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetMessage
|
||||
|
||||
`func (o *ParseError) SetMessage(v string)`
|
||||
|
||||
SetMessage sets Message field to given value.
|
||||
|
||||
### HasMessage
|
||||
|
||||
`func (o *ParseError) HasMessage() bool`
|
||||
|
||||
HasMessage returns a boolean if a field has been set.
|
||||
|
||||
### GetStart
|
||||
|
||||
`func (o *ParseError) GetStart() SourcePosition`
|
||||
|
||||
GetStart returns the Start field if non-nil, zero value otherwise.
|
||||
|
||||
### GetStartOk
|
||||
|
||||
`func (o *ParseError) GetStartOk() (*SourcePosition, bool)`
|
||||
|
||||
GetStartOk returns a tuple with the Start field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetStart
|
||||
|
||||
`func (o *ParseError) SetStart(v SourcePosition)`
|
||||
|
||||
SetStart sets Start field to given value.
|
||||
|
||||
### HasStart
|
||||
|
||||
`func (o *ParseError) HasStart() bool`
|
||||
|
||||
HasStart returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
450
internal/httpclient/docs/PermissionApi.md
generated
Normal file
450
internal/httpclient/docs/PermissionApi.md
generated
Normal file
@@ -0,0 +1,450 @@
|
||||
# \PermissionApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**BatchCheckPermission**](PermissionApi.md#BatchCheckPermission) | **Post** /relation-tuples/batch/check | Batch check permissions
|
||||
[**CheckPermission**](PermissionApi.md#CheckPermission) | **Get** /relation-tuples/check/openapi | Check a permission
|
||||
[**CheckPermissionOrError**](PermissionApi.md#CheckPermissionOrError) | **Get** /relation-tuples/check | Check a permission
|
||||
[**ExpandPermissions**](PermissionApi.md#ExpandPermissions) | **Get** /relation-tuples/expand | Expand a Relationship into permissions.
|
||||
[**PostCheckPermission**](PermissionApi.md#PostCheckPermission) | **Post** /relation-tuples/check/openapi | Check a permission
|
||||
[**PostCheckPermissionOrError**](PermissionApi.md#PostCheckPermissionOrError) | **Post** /relation-tuples/check | Check a permission
|
||||
|
||||
|
||||
|
||||
## BatchCheckPermission
|
||||
|
||||
> BatchCheckPermissionResult BatchCheckPermission(ctx).MaxDepth(maxDepth).BatchCheckPermissionBody(batchCheckPermissionBody).Execute()
|
||||
|
||||
Batch check permissions
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
batchCheckPermissionBody := *openapiclient.NewBatchCheckPermissionBody() // BatchCheckPermissionBody | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.BatchCheckPermission(context.Background()).MaxDepth(maxDepth).BatchCheckPermissionBody(batchCheckPermissionBody).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.BatchCheckPermission``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `BatchCheckPermission`: BatchCheckPermissionResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.BatchCheckPermission`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiBatchCheckPermissionRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**maxDepth** | **int64** | |
|
||||
**batchCheckPermissionBody** | [**BatchCheckPermissionBody**](BatchCheckPermissionBody.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**BatchCheckPermissionResult**](BatchCheckPermissionResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## CheckPermission
|
||||
|
||||
> CheckPermissionResult CheckPermission(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute()
|
||||
|
||||
Check a permission
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
|
||||
object := "object_example" // string | Object of the Relationship (optional)
|
||||
relation := "relation_example" // string | Relation of the Relationship (optional)
|
||||
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
|
||||
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
|
||||
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
|
||||
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.CheckPermission(context.Background()).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.CheckPermission``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `CheckPermission`: CheckPermissionResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.CheckPermission`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiCheckPermissionRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**namespace** | **string** | Namespace of the Relationship |
|
||||
**object** | **string** | Object of the Relationship |
|
||||
**relation** | **string** | Relation of the Relationship |
|
||||
**subjectId** | **string** | SubjectID of the Relationship |
|
||||
**subjectSetNamespace** | **string** | Namespace of the Subject Set |
|
||||
**subjectSetObject** | **string** | Object of the Subject Set |
|
||||
**subjectSetRelation** | **string** | Relation of the Subject Set |
|
||||
**maxDepth** | **int64** | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CheckPermissionResult**](CheckPermissionResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## CheckPermissionOrError
|
||||
|
||||
> CheckPermissionResult CheckPermissionOrError(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute()
|
||||
|
||||
Check a permission
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
|
||||
object := "object_example" // string | Object of the Relationship (optional)
|
||||
relation := "relation_example" // string | Relation of the Relationship (optional)
|
||||
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
|
||||
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
|
||||
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
|
||||
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.CheckPermissionOrError(context.Background()).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).MaxDepth(maxDepth).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.CheckPermissionOrError``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `CheckPermissionOrError`: CheckPermissionResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.CheckPermissionOrError`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiCheckPermissionOrErrorRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**namespace** | **string** | Namespace of the Relationship |
|
||||
**object** | **string** | Object of the Relationship |
|
||||
**relation** | **string** | Relation of the Relationship |
|
||||
**subjectId** | **string** | SubjectID of the Relationship |
|
||||
**subjectSetNamespace** | **string** | Namespace of the Subject Set |
|
||||
**subjectSetObject** | **string** | Object of the Subject Set |
|
||||
**subjectSetRelation** | **string** | Relation of the Subject Set |
|
||||
**maxDepth** | **int64** | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CheckPermissionResult**](CheckPermissionResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ExpandPermissions
|
||||
|
||||
> ExpandedPermissionTree ExpandPermissions(ctx).Namespace(namespace).Object(object).Relation(relation).MaxDepth(maxDepth).Execute()
|
||||
|
||||
Expand a Relationship into permissions.
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
namespace := "namespace_example" // string | Namespace of the Subject Set
|
||||
object := "object_example" // string | Object of the Subject Set
|
||||
relation := "relation_example" // string | Relation of the Subject Set
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.ExpandPermissions(context.Background()).Namespace(namespace).Object(object).Relation(relation).MaxDepth(maxDepth).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.ExpandPermissions``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `ExpandPermissions`: ExpandedPermissionTree
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.ExpandPermissions`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiExpandPermissionsRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**namespace** | **string** | Namespace of the Subject Set |
|
||||
**object** | **string** | Object of the Subject Set |
|
||||
**relation** | **string** | Relation of the Subject Set |
|
||||
**maxDepth** | **int64** | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**ExpandedPermissionTree**](ExpandedPermissionTree.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## PostCheckPermission
|
||||
|
||||
> CheckPermissionResult PostCheckPermission(ctx).MaxDepth(maxDepth).PostCheckPermissionBody(postCheckPermissionBody).Execute()
|
||||
|
||||
Check a permission
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
postCheckPermissionBody := *openapiclient.NewPostCheckPermissionBody() // PostCheckPermissionBody | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.PostCheckPermission(context.Background()).MaxDepth(maxDepth).PostCheckPermissionBody(postCheckPermissionBody).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.PostCheckPermission``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `PostCheckPermission`: CheckPermissionResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.PostCheckPermission`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiPostCheckPermissionRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**maxDepth** | **int64** | |
|
||||
**postCheckPermissionBody** | [**PostCheckPermissionBody**](PostCheckPermissionBody.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CheckPermissionResult**](CheckPermissionResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## PostCheckPermissionOrError
|
||||
|
||||
> CheckPermissionResult PostCheckPermissionOrError(ctx).MaxDepth(maxDepth).PostCheckPermissionOrErrorBody(postCheckPermissionOrErrorBody).Execute()
|
||||
|
||||
Check a permission
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
maxDepth := int64(789) // int64 | (optional)
|
||||
postCheckPermissionOrErrorBody := *openapiclient.NewPostCheckPermissionOrErrorBody() // PostCheckPermissionOrErrorBody | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.PermissionApi.PostCheckPermissionOrError(context.Background()).MaxDepth(maxDepth).PostCheckPermissionOrErrorBody(postCheckPermissionOrErrorBody).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PermissionApi.PostCheckPermissionOrError``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `PostCheckPermissionOrError`: CheckPermissionResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `PermissionApi.PostCheckPermissionOrError`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiPostCheckPermissionOrErrorRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**maxDepth** | **int64** | |
|
||||
**postCheckPermissionOrErrorBody** | [**PostCheckPermissionOrErrorBody**](PostCheckPermissionOrErrorBody.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CheckPermissionResult**](CheckPermissionResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
160
internal/httpclient/docs/PostCheckPermissionBody.md
generated
Normal file
160
internal/httpclient/docs/PostCheckPermissionBody.md
generated
Normal file
@@ -0,0 +1,160 @@
|
||||
# PostCheckPermissionBody
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | Pointer to **string** | Namespace to query | [optional]
|
||||
**Object** | Pointer to **string** | Object to query | [optional]
|
||||
**Relation** | Pointer to **string** | Relation to query | [optional]
|
||||
**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional]
|
||||
**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewPostCheckPermissionBody
|
||||
|
||||
`func NewPostCheckPermissionBody() *PostCheckPermissionBody`
|
||||
|
||||
NewPostCheckPermissionBody instantiates a new PostCheckPermissionBody object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewPostCheckPermissionBodyWithDefaults
|
||||
|
||||
`func NewPostCheckPermissionBodyWithDefaults() *PostCheckPermissionBody`
|
||||
|
||||
NewPostCheckPermissionBodyWithDefaults instantiates a new PostCheckPermissionBody object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *PostCheckPermissionBody) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
### HasNamespace
|
||||
|
||||
`func (o *PostCheckPermissionBody) HasNamespace() bool`
|
||||
|
||||
HasNamespace returns a boolean if a field has been set.
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *PostCheckPermissionBody) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
### HasObject
|
||||
|
||||
`func (o *PostCheckPermissionBody) HasObject() bool`
|
||||
|
||||
HasObject returns a boolean if a field has been set.
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *PostCheckPermissionBody) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
### HasRelation
|
||||
|
||||
`func (o *PostCheckPermissionBody) HasRelation() bool`
|
||||
|
||||
HasRelation returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetSubjectId() string`
|
||||
|
||||
GetSubjectId returns the SubjectId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectIdOk
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetSubjectIdOk() (*string, bool)`
|
||||
|
||||
GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionBody) SetSubjectId(v string)`
|
||||
|
||||
SetSubjectId sets SubjectId field to given value.
|
||||
|
||||
### HasSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionBody) HasSubjectId() bool`
|
||||
|
||||
HasSubjectId returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSet`
|
||||
|
||||
GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectSetOk
|
||||
|
||||
`func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSet, bool)`
|
||||
|
||||
GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSet)`
|
||||
|
||||
SetSubjectSet sets SubjectSet field to given value.
|
||||
|
||||
### HasSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionBody) HasSubjectSet() bool`
|
||||
|
||||
HasSubjectSet returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
160
internal/httpclient/docs/PostCheckPermissionOrErrorBody.md
generated
Normal file
160
internal/httpclient/docs/PostCheckPermissionOrErrorBody.md
generated
Normal file
@@ -0,0 +1,160 @@
|
||||
# PostCheckPermissionOrErrorBody
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | Pointer to **string** | Namespace to query | [optional]
|
||||
**Object** | Pointer to **string** | Object to query | [optional]
|
||||
**Relation** | Pointer to **string** | Relation to query | [optional]
|
||||
**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional]
|
||||
**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewPostCheckPermissionOrErrorBody
|
||||
|
||||
`func NewPostCheckPermissionOrErrorBody() *PostCheckPermissionOrErrorBody`
|
||||
|
||||
NewPostCheckPermissionOrErrorBody instantiates a new PostCheckPermissionOrErrorBody object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewPostCheckPermissionOrErrorBodyWithDefaults
|
||||
|
||||
`func NewPostCheckPermissionOrErrorBodyWithDefaults() *PostCheckPermissionOrErrorBody`
|
||||
|
||||
NewPostCheckPermissionOrErrorBodyWithDefaults instantiates a new PostCheckPermissionOrErrorBody object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
### HasNamespace
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) HasNamespace() bool`
|
||||
|
||||
HasNamespace returns a boolean if a field has been set.
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
### HasObject
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) HasObject() bool`
|
||||
|
||||
HasObject returns a boolean if a field has been set.
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
### HasRelation
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) HasRelation() bool`
|
||||
|
||||
HasRelation returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetSubjectId() string`
|
||||
|
||||
GetSubjectId returns the SubjectId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectIdOk
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetSubjectIdOk() (*string, bool)`
|
||||
|
||||
GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) SetSubjectId(v string)`
|
||||
|
||||
SetSubjectId sets SubjectId field to given value.
|
||||
|
||||
### HasSubjectId
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) HasSubjectId() bool`
|
||||
|
||||
HasSubjectId returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetSubjectSet() SubjectSet`
|
||||
|
||||
GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectSetOk
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) GetSubjectSetOk() (*SubjectSet, bool)`
|
||||
|
||||
GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) SetSubjectSet(v SubjectSet)`
|
||||
|
||||
SetSubjectSet sets SubjectSet field to given value.
|
||||
|
||||
### HasSubjectSet
|
||||
|
||||
`func (o *PostCheckPermissionOrErrorBody) HasSubjectSet() bool`
|
||||
|
||||
HasSubjectSet returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
160
internal/httpclient/docs/RelationQuery.md
generated
Normal file
160
internal/httpclient/docs/RelationQuery.md
generated
Normal file
@@ -0,0 +1,160 @@
|
||||
# RelationQuery
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | Pointer to **string** | Namespace to query | [optional]
|
||||
**Object** | Pointer to **string** | Object to query | [optional]
|
||||
**Relation** | Pointer to **string** | Relation to query | [optional]
|
||||
**SubjectId** | Pointer to **string** | SubjectID to query Either SubjectSet or SubjectID can be provided. | [optional]
|
||||
**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewRelationQuery
|
||||
|
||||
`func NewRelationQuery() *RelationQuery`
|
||||
|
||||
NewRelationQuery instantiates a new RelationQuery object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewRelationQueryWithDefaults
|
||||
|
||||
`func NewRelationQueryWithDefaults() *RelationQuery`
|
||||
|
||||
NewRelationQueryWithDefaults instantiates a new RelationQuery object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *RelationQuery) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *RelationQuery) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *RelationQuery) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
### HasNamespace
|
||||
|
||||
`func (o *RelationQuery) HasNamespace() bool`
|
||||
|
||||
HasNamespace returns a boolean if a field has been set.
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *RelationQuery) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *RelationQuery) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *RelationQuery) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
### HasObject
|
||||
|
||||
`func (o *RelationQuery) HasObject() bool`
|
||||
|
||||
HasObject returns a boolean if a field has been set.
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *RelationQuery) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *RelationQuery) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *RelationQuery) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
### HasRelation
|
||||
|
||||
`func (o *RelationQuery) HasRelation() bool`
|
||||
|
||||
HasRelation returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectId
|
||||
|
||||
`func (o *RelationQuery) GetSubjectId() string`
|
||||
|
||||
GetSubjectId returns the SubjectId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectIdOk
|
||||
|
||||
`func (o *RelationQuery) GetSubjectIdOk() (*string, bool)`
|
||||
|
||||
GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectId
|
||||
|
||||
`func (o *RelationQuery) SetSubjectId(v string)`
|
||||
|
||||
SetSubjectId sets SubjectId field to given value.
|
||||
|
||||
### HasSubjectId
|
||||
|
||||
`func (o *RelationQuery) HasSubjectId() bool`
|
||||
|
||||
HasSubjectId returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectSet
|
||||
|
||||
`func (o *RelationQuery) GetSubjectSet() SubjectSet`
|
||||
|
||||
GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectSetOk
|
||||
|
||||
`func (o *RelationQuery) GetSubjectSetOk() (*SubjectSet, bool)`
|
||||
|
||||
GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectSet
|
||||
|
||||
`func (o *RelationQuery) SetSubjectSet(v SubjectSet)`
|
||||
|
||||
SetSubjectSet sets SubjectSet field to given value.
|
||||
|
||||
### HasSubjectSet
|
||||
|
||||
`func (o *RelationQuery) HasSubjectSet() bool`
|
||||
|
||||
HasSubjectSet returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
145
internal/httpclient/docs/Relationship.md
generated
Normal file
145
internal/httpclient/docs/Relationship.md
generated
Normal file
@@ -0,0 +1,145 @@
|
||||
# Relationship
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | **string** | Namespace of the Relation Tuple |
|
||||
**Object** | **string** | Object of the Relation Tuple |
|
||||
**Relation** | **string** | Relation of the Relation Tuple |
|
||||
**SubjectId** | Pointer to **string** | SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided. | [optional]
|
||||
**SubjectSet** | Pointer to [**SubjectSet**](SubjectSet.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewRelationship
|
||||
|
||||
`func NewRelationship(namespace string, object string, relation string, ) *Relationship`
|
||||
|
||||
NewRelationship instantiates a new Relationship object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewRelationshipWithDefaults
|
||||
|
||||
`func NewRelationshipWithDefaults() *Relationship`
|
||||
|
||||
NewRelationshipWithDefaults instantiates a new Relationship object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *Relationship) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *Relationship) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *Relationship) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *Relationship) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *Relationship) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *Relationship) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *Relationship) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *Relationship) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *Relationship) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
|
||||
### GetSubjectId
|
||||
|
||||
`func (o *Relationship) GetSubjectId() string`
|
||||
|
||||
GetSubjectId returns the SubjectId field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectIdOk
|
||||
|
||||
`func (o *Relationship) GetSubjectIdOk() (*string, bool)`
|
||||
|
||||
GetSubjectIdOk returns a tuple with the SubjectId field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectId
|
||||
|
||||
`func (o *Relationship) SetSubjectId(v string)`
|
||||
|
||||
SetSubjectId sets SubjectId field to given value.
|
||||
|
||||
### HasSubjectId
|
||||
|
||||
`func (o *Relationship) HasSubjectId() bool`
|
||||
|
||||
HasSubjectId returns a boolean if a field has been set.
|
||||
|
||||
### GetSubjectSet
|
||||
|
||||
`func (o *Relationship) GetSubjectSet() SubjectSet`
|
||||
|
||||
GetSubjectSet returns the SubjectSet field if non-nil, zero value otherwise.
|
||||
|
||||
### GetSubjectSetOk
|
||||
|
||||
`func (o *Relationship) GetSubjectSetOk() (*SubjectSet, bool)`
|
||||
|
||||
GetSubjectSetOk returns a tuple with the SubjectSet field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetSubjectSet
|
||||
|
||||
`func (o *Relationship) SetSubjectSet(v SubjectSet)`
|
||||
|
||||
SetSubjectSet sets SubjectSet field to given value.
|
||||
|
||||
### HasSubjectSet
|
||||
|
||||
`func (o *Relationship) HasSubjectSet() bool`
|
||||
|
||||
HasSubjectSet returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
429
internal/httpclient/docs/RelationshipApi.md
generated
Normal file
429
internal/httpclient/docs/RelationshipApi.md
generated
Normal file
@@ -0,0 +1,429 @@
|
||||
# \RelationshipApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**CheckOplSyntax**](RelationshipApi.md#CheckOplSyntax) | **Post** /opl/syntax/check | Check the syntax of an OPL file
|
||||
[**CreateRelationship**](RelationshipApi.md#CreateRelationship) | **Put** /admin/relation-tuples | Create a Relationship
|
||||
[**DeleteRelationships**](RelationshipApi.md#DeleteRelationships) | **Delete** /admin/relation-tuples | Delete Relationships
|
||||
[**GetRelationships**](RelationshipApi.md#GetRelationships) | **Get** /relation-tuples | Query relationships
|
||||
[**ListRelationshipNamespaces**](RelationshipApi.md#ListRelationshipNamespaces) | **Get** /namespaces | Query namespaces
|
||||
[**PatchRelationships**](RelationshipApi.md#PatchRelationships) | **Patch** /admin/relation-tuples | Patch Multiple Relationships
|
||||
|
||||
|
||||
|
||||
## CheckOplSyntax
|
||||
|
||||
> CheckOplSyntaxResult CheckOplSyntax(ctx).Body(body).Execute()
|
||||
|
||||
Check the syntax of an OPL file
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
body := "body_example" // string | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.CheckOplSyntax(context.Background()).Body(body).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.CheckOplSyntax``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `CheckOplSyntax`: CheckOplSyntaxResult
|
||||
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.CheckOplSyntax`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiCheckOplSyntaxRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **string** | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**CheckOplSyntaxResult**](CheckOplSyntaxResult.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: text/plain
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## CreateRelationship
|
||||
|
||||
> Relationship CreateRelationship(ctx).CreateRelationshipBody(createRelationshipBody).Execute()
|
||||
|
||||
Create a Relationship
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
createRelationshipBody := *openapiclient.NewCreateRelationshipBody() // CreateRelationshipBody | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.CreateRelationship(context.Background()).CreateRelationshipBody(createRelationshipBody).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.CreateRelationship``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `CreateRelationship`: Relationship
|
||||
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.CreateRelationship`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiCreateRelationshipRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**createRelationshipBody** | [**CreateRelationshipBody**](CreateRelationshipBody.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Relationship**](Relationship.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## DeleteRelationships
|
||||
|
||||
> DeleteRelationships(ctx).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
|
||||
|
||||
Delete Relationships
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
|
||||
object := "object_example" // string | Object of the Relationship (optional)
|
||||
relation := "relation_example" // string | Relation of the Relationship (optional)
|
||||
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
|
||||
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
|
||||
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
|
||||
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.DeleteRelationships(context.Background()).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.DeleteRelationships``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiDeleteRelationshipsRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**namespace** | **string** | Namespace of the Relationship |
|
||||
**object** | **string** | Object of the Relationship |
|
||||
**relation** | **string** | Relation of the Relationship |
|
||||
**subjectId** | **string** | SubjectID of the Relationship |
|
||||
**subjectSetNamespace** | **string** | Namespace of the Subject Set |
|
||||
**subjectSetObject** | **string** | Object of the Subject Set |
|
||||
**subjectSetRelation** | **string** | Relation of the Subject Set |
|
||||
|
||||
### Return type
|
||||
|
||||
(empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## GetRelationships
|
||||
|
||||
> Relationships GetRelationships(ctx).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
|
||||
|
||||
Query relationships
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
pageSize := int64(789) // int64 | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional) (default to 250)
|
||||
pageToken := "pageToken_example" // string | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). (optional)
|
||||
namespace := "namespace_example" // string | Namespace of the Relationship (optional)
|
||||
object := "object_example" // string | Object of the Relationship (optional)
|
||||
relation := "relation_example" // string | Relation of the Relationship (optional)
|
||||
subjectId := "subjectId_example" // string | SubjectID of the Relationship (optional)
|
||||
subjectSetNamespace := "subjectSetNamespace_example" // string | Namespace of the Subject Set (optional)
|
||||
subjectSetObject := "subjectSetObject_example" // string | Object of the Subject Set (optional)
|
||||
subjectSetRelation := "subjectSetRelation_example" // string | Relation of the Subject Set (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.GetRelationships(context.Background()).PageSize(pageSize).PageToken(pageToken).Namespace(namespace).Object(object).Relation(relation).SubjectId(subjectId).SubjectSetNamespace(subjectSetNamespace).SubjectSetObject(subjectSetObject).SubjectSetRelation(subjectSetRelation).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.GetRelationships``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `GetRelationships`: Relationships
|
||||
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.GetRelationships`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiGetRelationshipsRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pageSize** | **int64** | Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). | [default to 250]
|
||||
**pageToken** | **string** | Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.com/docs/ecosystem/api-design#pagination). |
|
||||
**namespace** | **string** | Namespace of the Relationship |
|
||||
**object** | **string** | Object of the Relationship |
|
||||
**relation** | **string** | Relation of the Relationship |
|
||||
**subjectId** | **string** | SubjectID of the Relationship |
|
||||
**subjectSetNamespace** | **string** | Namespace of the Subject Set |
|
||||
**subjectSetObject** | **string** | Object of the Subject Set |
|
||||
**subjectSetRelation** | **string** | Relation of the Subject Set |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Relationships**](Relationships.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## ListRelationshipNamespaces
|
||||
|
||||
> RelationshipNamespaces ListRelationshipNamespaces(ctx).Execute()
|
||||
|
||||
Query namespaces
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.ListRelationshipNamespaces(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.ListRelationshipNamespaces``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `ListRelationshipNamespaces`: RelationshipNamespaces
|
||||
fmt.Fprintf(os.Stdout, "Response from `RelationshipApi.ListRelationshipNamespaces`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiListRelationshipNamespacesRequest struct via the builder pattern
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
[**RelationshipNamespaces**](RelationshipNamespaces.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## PatchRelationships
|
||||
|
||||
> PatchRelationships(ctx).RelationshipPatch(relationshipPatch).Execute()
|
||||
|
||||
Patch Multiple Relationships
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "./openapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
relationshipPatch := []openapiclient.RelationshipPatch{*openapiclient.NewRelationshipPatch()} // []RelationshipPatch | (optional)
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.RelationshipApi.PatchRelationships(context.Background()).RelationshipPatch(relationshipPatch).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `RelationshipApi.PatchRelationships``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiPatchRelationshipsRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**relationshipPatch** | [**[]RelationshipPatch**](RelationshipPatch.md) | |
|
||||
|
||||
### Return type
|
||||
|
||||
(empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
56
internal/httpclient/docs/RelationshipNamespaces.md
generated
Normal file
56
internal/httpclient/docs/RelationshipNamespaces.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# RelationshipNamespaces
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespaces** | Pointer to [**[]Namespace**](Namespace.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewRelationshipNamespaces
|
||||
|
||||
`func NewRelationshipNamespaces() *RelationshipNamespaces`
|
||||
|
||||
NewRelationshipNamespaces instantiates a new RelationshipNamespaces object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewRelationshipNamespacesWithDefaults
|
||||
|
||||
`func NewRelationshipNamespacesWithDefaults() *RelationshipNamespaces`
|
||||
|
||||
NewRelationshipNamespacesWithDefaults instantiates a new RelationshipNamespaces object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespaces
|
||||
|
||||
`func (o *RelationshipNamespaces) GetNamespaces() []Namespace`
|
||||
|
||||
GetNamespaces returns the Namespaces field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespacesOk
|
||||
|
||||
`func (o *RelationshipNamespaces) GetNamespacesOk() (*[]Namespace, bool)`
|
||||
|
||||
GetNamespacesOk returns a tuple with the Namespaces field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespaces
|
||||
|
||||
`func (o *RelationshipNamespaces) SetNamespaces(v []Namespace)`
|
||||
|
||||
SetNamespaces sets Namespaces field to given value.
|
||||
|
||||
### HasNamespaces
|
||||
|
||||
`func (o *RelationshipNamespaces) HasNamespaces() bool`
|
||||
|
||||
HasNamespaces returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
82
internal/httpclient/docs/RelationshipPatch.md
generated
Normal file
82
internal/httpclient/docs/RelationshipPatch.md
generated
Normal file
@@ -0,0 +1,82 @@
|
||||
# RelationshipPatch
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Action** | Pointer to **string** | | [optional]
|
||||
**RelationTuple** | Pointer to [**Relationship**](Relationship.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewRelationshipPatch
|
||||
|
||||
`func NewRelationshipPatch() *RelationshipPatch`
|
||||
|
||||
NewRelationshipPatch instantiates a new RelationshipPatch object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewRelationshipPatchWithDefaults
|
||||
|
||||
`func NewRelationshipPatchWithDefaults() *RelationshipPatch`
|
||||
|
||||
NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetAction
|
||||
|
||||
`func (o *RelationshipPatch) GetAction() string`
|
||||
|
||||
GetAction returns the Action field if non-nil, zero value otherwise.
|
||||
|
||||
### GetActionOk
|
||||
|
||||
`func (o *RelationshipPatch) GetActionOk() (*string, bool)`
|
||||
|
||||
GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetAction
|
||||
|
||||
`func (o *RelationshipPatch) SetAction(v string)`
|
||||
|
||||
SetAction sets Action field to given value.
|
||||
|
||||
### HasAction
|
||||
|
||||
`func (o *RelationshipPatch) HasAction() bool`
|
||||
|
||||
HasAction returns a boolean if a field has been set.
|
||||
|
||||
### GetRelationTuple
|
||||
|
||||
`func (o *RelationshipPatch) GetRelationTuple() Relationship`
|
||||
|
||||
GetRelationTuple returns the RelationTuple field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationTupleOk
|
||||
|
||||
`func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool)`
|
||||
|
||||
GetRelationTupleOk returns a tuple with the RelationTuple field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelationTuple
|
||||
|
||||
`func (o *RelationshipPatch) SetRelationTuple(v Relationship)`
|
||||
|
||||
SetRelationTuple sets RelationTuple field to given value.
|
||||
|
||||
### HasRelationTuple
|
||||
|
||||
`func (o *RelationshipPatch) HasRelationTuple() bool`
|
||||
|
||||
HasRelationTuple returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
82
internal/httpclient/docs/Relationships.md
generated
Normal file
82
internal/httpclient/docs/Relationships.md
generated
Normal file
@@ -0,0 +1,82 @@
|
||||
# Relationships
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**NextPageToken** | Pointer to **string** | The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page. | [optional]
|
||||
**RelationTuples** | Pointer to [**[]Relationship**](Relationship.md) | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewRelationships
|
||||
|
||||
`func NewRelationships() *Relationships`
|
||||
|
||||
NewRelationships instantiates a new Relationships object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewRelationshipsWithDefaults
|
||||
|
||||
`func NewRelationshipsWithDefaults() *Relationships`
|
||||
|
||||
NewRelationshipsWithDefaults instantiates a new Relationships object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNextPageToken
|
||||
|
||||
`func (o *Relationships) GetNextPageToken() string`
|
||||
|
||||
GetNextPageToken returns the NextPageToken field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNextPageTokenOk
|
||||
|
||||
`func (o *Relationships) GetNextPageTokenOk() (*string, bool)`
|
||||
|
||||
GetNextPageTokenOk returns a tuple with the NextPageToken field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNextPageToken
|
||||
|
||||
`func (o *Relationships) SetNextPageToken(v string)`
|
||||
|
||||
SetNextPageToken sets NextPageToken field to given value.
|
||||
|
||||
### HasNextPageToken
|
||||
|
||||
`func (o *Relationships) HasNextPageToken() bool`
|
||||
|
||||
HasNextPageToken returns a boolean if a field has been set.
|
||||
|
||||
### GetRelationTuples
|
||||
|
||||
`func (o *Relationships) GetRelationTuples() []Relationship`
|
||||
|
||||
GetRelationTuples returns the RelationTuples field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationTuplesOk
|
||||
|
||||
`func (o *Relationships) GetRelationTuplesOk() (*[]Relationship, bool)`
|
||||
|
||||
GetRelationTuplesOk returns a tuple with the RelationTuples field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelationTuples
|
||||
|
||||
`func (o *Relationships) SetRelationTuples(v []Relationship)`
|
||||
|
||||
SetRelationTuples sets RelationTuples field to given value.
|
||||
|
||||
### HasRelationTuples
|
||||
|
||||
`func (o *Relationships) HasRelationTuples() bool`
|
||||
|
||||
HasRelationTuples returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
82
internal/httpclient/docs/SourcePosition.md
generated
Normal file
82
internal/httpclient/docs/SourcePosition.md
generated
Normal file
@@ -0,0 +1,82 @@
|
||||
# SourcePosition
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Line** | Pointer to **int64** | | [optional]
|
||||
**Column** | Pointer to **int64** | | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewSourcePosition
|
||||
|
||||
`func NewSourcePosition() *SourcePosition`
|
||||
|
||||
NewSourcePosition instantiates a new SourcePosition object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewSourcePositionWithDefaults
|
||||
|
||||
`func NewSourcePositionWithDefaults() *SourcePosition`
|
||||
|
||||
NewSourcePositionWithDefaults instantiates a new SourcePosition object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetLine
|
||||
|
||||
`func (o *SourcePosition) GetLine() int64`
|
||||
|
||||
GetLine returns the Line field if non-nil, zero value otherwise.
|
||||
|
||||
### GetLineOk
|
||||
|
||||
`func (o *SourcePosition) GetLineOk() (*int64, bool)`
|
||||
|
||||
GetLineOk returns a tuple with the Line field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetLine
|
||||
|
||||
`func (o *SourcePosition) SetLine(v int64)`
|
||||
|
||||
SetLine sets Line field to given value.
|
||||
|
||||
### HasLine
|
||||
|
||||
`func (o *SourcePosition) HasLine() bool`
|
||||
|
||||
HasLine returns a boolean if a field has been set.
|
||||
|
||||
### GetColumn
|
||||
|
||||
`func (o *SourcePosition) GetColumn() int64`
|
||||
|
||||
GetColumn returns the Column field if non-nil, zero value otherwise.
|
||||
|
||||
### GetColumnOk
|
||||
|
||||
`func (o *SourcePosition) GetColumnOk() (*int64, bool)`
|
||||
|
||||
GetColumnOk returns a tuple with the Column field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetColumn
|
||||
|
||||
`func (o *SourcePosition) SetColumn(v int64)`
|
||||
|
||||
SetColumn sets Column field to given value.
|
||||
|
||||
### HasColumn
|
||||
|
||||
`func (o *SourcePosition) HasColumn() bool`
|
||||
|
||||
HasColumn returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
93
internal/httpclient/docs/SubjectSet.md
generated
Normal file
93
internal/httpclient/docs/SubjectSet.md
generated
Normal file
@@ -0,0 +1,93 @@
|
||||
# SubjectSet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Namespace** | **string** | Namespace of the Subject Set |
|
||||
**Object** | **string** | Object of the Subject Set |
|
||||
**Relation** | **string** | Relation of the Subject Set |
|
||||
|
||||
## Methods
|
||||
|
||||
### NewSubjectSet
|
||||
|
||||
`func NewSubjectSet(namespace string, object string, relation string, ) *SubjectSet`
|
||||
|
||||
NewSubjectSet instantiates a new SubjectSet object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewSubjectSetWithDefaults
|
||||
|
||||
`func NewSubjectSetWithDefaults() *SubjectSet`
|
||||
|
||||
NewSubjectSetWithDefaults instantiates a new SubjectSet object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetNamespace
|
||||
|
||||
`func (o *SubjectSet) GetNamespace() string`
|
||||
|
||||
GetNamespace returns the Namespace field if non-nil, zero value otherwise.
|
||||
|
||||
### GetNamespaceOk
|
||||
|
||||
`func (o *SubjectSet) GetNamespaceOk() (*string, bool)`
|
||||
|
||||
GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetNamespace
|
||||
|
||||
`func (o *SubjectSet) SetNamespace(v string)`
|
||||
|
||||
SetNamespace sets Namespace field to given value.
|
||||
|
||||
|
||||
### GetObject
|
||||
|
||||
`func (o *SubjectSet) GetObject() string`
|
||||
|
||||
GetObject returns the Object field if non-nil, zero value otherwise.
|
||||
|
||||
### GetObjectOk
|
||||
|
||||
`func (o *SubjectSet) GetObjectOk() (*string, bool)`
|
||||
|
||||
GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetObject
|
||||
|
||||
`func (o *SubjectSet) SetObject(v string)`
|
||||
|
||||
SetObject sets Object field to given value.
|
||||
|
||||
|
||||
### GetRelation
|
||||
|
||||
`func (o *SubjectSet) GetRelation() string`
|
||||
|
||||
GetRelation returns the Relation field if non-nil, zero value otherwise.
|
||||
|
||||
### GetRelationOk
|
||||
|
||||
`func (o *SubjectSet) GetRelationOk() (*string, bool)`
|
||||
|
||||
GetRelationOk returns a tuple with the Relation field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetRelation
|
||||
|
||||
`func (o *SubjectSet) SetRelation(v string)`
|
||||
|
||||
SetRelation sets Relation field to given value.
|
||||
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
56
internal/httpclient/docs/Version.md
generated
Normal file
56
internal/httpclient/docs/Version.md
generated
Normal file
@@ -0,0 +1,56 @@
|
||||
# Version
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Version** | Pointer to **string** | Version is the service's version. | [optional]
|
||||
|
||||
## Methods
|
||||
|
||||
### NewVersion
|
||||
|
||||
`func NewVersion() *Version`
|
||||
|
||||
NewVersion instantiates a new Version object
|
||||
This constructor will assign default values to properties that have it defined,
|
||||
and makes sure properties required by API are set, but the set of arguments
|
||||
will change when the set of required properties is changed
|
||||
|
||||
### NewVersionWithDefaults
|
||||
|
||||
`func NewVersionWithDefaults() *Version`
|
||||
|
||||
NewVersionWithDefaults instantiates a new Version object
|
||||
This constructor will only assign default values to properties that have it defined,
|
||||
but it doesn't guarantee that properties required by API are set
|
||||
|
||||
### GetVersion
|
||||
|
||||
`func (o *Version) GetVersion() string`
|
||||
|
||||
GetVersion returns the Version field if non-nil, zero value otherwise.
|
||||
|
||||
### GetVersionOk
|
||||
|
||||
`func (o *Version) GetVersionOk() (*string, bool)`
|
||||
|
||||
GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
|
||||
and a boolean to check if the value has been set.
|
||||
|
||||
### SetVersion
|
||||
|
||||
`func (o *Version) SetVersion(v string)`
|
||||
|
||||
SetVersion sets Version field to given value.
|
||||
|
||||
### HasVersion
|
||||
|
||||
`func (o *Version) HasVersion() bool`
|
||||
|
||||
HasVersion returns a boolean if a field has been set.
|
||||
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
58
internal/httpclient/git_push.sh
generated
Normal file
58
internal/httpclient/git_push.sh
generated
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="ory"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="keto-client-go"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
114
internal/httpclient/model_batch_check_permission_body.go
generated
Normal file
114
internal/httpclient/model_batch_check_permission_body.go
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// BatchCheckPermissionBody Batch Check Permission Body
|
||||
type BatchCheckPermissionBody struct {
|
||||
Tuples []Relationship `json:"tuples,omitempty"`
|
||||
}
|
||||
|
||||
// NewBatchCheckPermissionBody instantiates a new BatchCheckPermissionBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewBatchCheckPermissionBody() *BatchCheckPermissionBody {
|
||||
this := BatchCheckPermissionBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBatchCheckPermissionBodyWithDefaults instantiates a new BatchCheckPermissionBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewBatchCheckPermissionBodyWithDefaults() *BatchCheckPermissionBody {
|
||||
this := BatchCheckPermissionBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetTuples returns the Tuples field value if set, zero value otherwise.
|
||||
func (o *BatchCheckPermissionBody) GetTuples() []Relationship {
|
||||
if o == nil || o.Tuples == nil {
|
||||
var ret []Relationship
|
||||
return ret
|
||||
}
|
||||
return o.Tuples
|
||||
}
|
||||
|
||||
// GetTuplesOk returns a tuple with the Tuples field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BatchCheckPermissionBody) GetTuplesOk() ([]Relationship, bool) {
|
||||
if o == nil || o.Tuples == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Tuples, true
|
||||
}
|
||||
|
||||
// HasTuples returns a boolean if a field has been set.
|
||||
func (o *BatchCheckPermissionBody) HasTuples() bool {
|
||||
if o != nil && o.Tuples != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTuples gets a reference to the given []Relationship and assigns it to the Tuples field.
|
||||
func (o *BatchCheckPermissionBody) SetTuples(v []Relationship) {
|
||||
o.Tuples = v
|
||||
}
|
||||
|
||||
func (o BatchCheckPermissionBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Tuples != nil {
|
||||
toSerialize["tuples"] = o.Tuples
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableBatchCheckPermissionBody struct {
|
||||
value *BatchCheckPermissionBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionBody) Get() *BatchCheckPermissionBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionBody) Set(val *BatchCheckPermissionBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBatchCheckPermissionBody(val *BatchCheckPermissionBody) *NullableBatchCheckPermissionBody {
|
||||
return &NullableBatchCheckPermissionBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
108
internal/httpclient/model_batch_check_permission_result.go
generated
Normal file
108
internal/httpclient/model_batch_check_permission_result.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// BatchCheckPermissionResult Batch Check Permission Result
|
||||
type BatchCheckPermissionResult struct {
|
||||
// An array of check results. The order aligns with the input order.
|
||||
Results []CheckPermissionResultWithError `json:"results"`
|
||||
}
|
||||
|
||||
// NewBatchCheckPermissionResult instantiates a new BatchCheckPermissionResult object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewBatchCheckPermissionResult(results []CheckPermissionResultWithError) *BatchCheckPermissionResult {
|
||||
this := BatchCheckPermissionResult{}
|
||||
this.Results = results
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBatchCheckPermissionResultWithDefaults instantiates a new BatchCheckPermissionResult object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewBatchCheckPermissionResultWithDefaults() *BatchCheckPermissionResult {
|
||||
this := BatchCheckPermissionResult{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetResults returns the Results field value
|
||||
func (o *BatchCheckPermissionResult) GetResults() []CheckPermissionResultWithError {
|
||||
if o == nil {
|
||||
var ret []CheckPermissionResultWithError
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Results
|
||||
}
|
||||
|
||||
// GetResultsOk returns a tuple with the Results field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BatchCheckPermissionResult) GetResultsOk() ([]CheckPermissionResultWithError, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Results, true
|
||||
}
|
||||
|
||||
// SetResults sets field value
|
||||
func (o *BatchCheckPermissionResult) SetResults(v []CheckPermissionResultWithError) {
|
||||
o.Results = v
|
||||
}
|
||||
|
||||
func (o BatchCheckPermissionResult) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["results"] = o.Results
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableBatchCheckPermissionResult struct {
|
||||
value *BatchCheckPermissionResult
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionResult) Get() *BatchCheckPermissionResult {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionResult) Set(val *BatchCheckPermissionResult) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionResult) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionResult) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBatchCheckPermissionResult(val *BatchCheckPermissionResult) *NullableBatchCheckPermissionResult {
|
||||
return &NullableBatchCheckPermissionResult{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBatchCheckPermissionResult) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBatchCheckPermissionResult) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
internal/httpclient/model_check_opl_syntax_result.go
generated
Normal file
115
internal/httpclient/model_check_opl_syntax_result.go
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// CheckOplSyntaxResult struct for CheckOplSyntaxResult
|
||||
type CheckOplSyntaxResult struct {
|
||||
// The list of syntax errors
|
||||
Errors []ParseError `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
// NewCheckOplSyntaxResult instantiates a new CheckOplSyntaxResult object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCheckOplSyntaxResult() *CheckOplSyntaxResult {
|
||||
this := CheckOplSyntaxResult{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCheckOplSyntaxResultWithDefaults instantiates a new CheckOplSyntaxResult object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCheckOplSyntaxResultWithDefaults() *CheckOplSyntaxResult {
|
||||
this := CheckOplSyntaxResult{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetErrors returns the Errors field value if set, zero value otherwise.
|
||||
func (o *CheckOplSyntaxResult) GetErrors() []ParseError {
|
||||
if o == nil || o.Errors == nil {
|
||||
var ret []ParseError
|
||||
return ret
|
||||
}
|
||||
return o.Errors
|
||||
}
|
||||
|
||||
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CheckOplSyntaxResult) GetErrorsOk() ([]ParseError, bool) {
|
||||
if o == nil || o.Errors == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Errors, true
|
||||
}
|
||||
|
||||
// HasErrors returns a boolean if a field has been set.
|
||||
func (o *CheckOplSyntaxResult) HasErrors() bool {
|
||||
if o != nil && o.Errors != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetErrors gets a reference to the given []ParseError and assigns it to the Errors field.
|
||||
func (o *CheckOplSyntaxResult) SetErrors(v []ParseError) {
|
||||
o.Errors = v
|
||||
}
|
||||
|
||||
func (o CheckOplSyntaxResult) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Errors != nil {
|
||||
toSerialize["errors"] = o.Errors
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableCheckOplSyntaxResult struct {
|
||||
value *CheckOplSyntaxResult
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCheckOplSyntaxResult) Get() *CheckOplSyntaxResult {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCheckOplSyntaxResult) Set(val *CheckOplSyntaxResult) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCheckOplSyntaxResult) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCheckOplSyntaxResult) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCheckOplSyntaxResult(val *CheckOplSyntaxResult) *NullableCheckOplSyntaxResult {
|
||||
return &NullableCheckOplSyntaxResult{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCheckOplSyntaxResult) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCheckOplSyntaxResult) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
108
internal/httpclient/model_check_permission_result.go
generated
Normal file
108
internal/httpclient/model_check_permission_result.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// CheckPermissionResult The content of the allowed field is mirrored in the HTTP status code.
|
||||
type CheckPermissionResult struct {
|
||||
// whether the relation tuple is allowed
|
||||
Allowed bool `json:"allowed"`
|
||||
}
|
||||
|
||||
// NewCheckPermissionResult instantiates a new CheckPermissionResult object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCheckPermissionResult(allowed bool) *CheckPermissionResult {
|
||||
this := CheckPermissionResult{}
|
||||
this.Allowed = allowed
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCheckPermissionResultWithDefaults instantiates a new CheckPermissionResult object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCheckPermissionResultWithDefaults() *CheckPermissionResult {
|
||||
this := CheckPermissionResult{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAllowed returns the Allowed field value
|
||||
func (o *CheckPermissionResult) GetAllowed() bool {
|
||||
if o == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Allowed
|
||||
}
|
||||
|
||||
// GetAllowedOk returns a tuple with the Allowed field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CheckPermissionResult) GetAllowedOk() (*bool, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Allowed, true
|
||||
}
|
||||
|
||||
// SetAllowed sets field value
|
||||
func (o *CheckPermissionResult) SetAllowed(v bool) {
|
||||
o.Allowed = v
|
||||
}
|
||||
|
||||
func (o CheckPermissionResult) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["allowed"] = o.Allowed
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableCheckPermissionResult struct {
|
||||
value *CheckPermissionResult
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResult) Get() *CheckPermissionResult {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResult) Set(val *CheckPermissionResult) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResult) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResult) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCheckPermissionResult(val *CheckPermissionResult) *NullableCheckPermissionResult {
|
||||
return &NullableCheckPermissionResult{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResult) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResult) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
145
internal/httpclient/model_check_permission_result_with_error.go
generated
Normal file
145
internal/httpclient/model_check_permission_result_with_error.go
generated
Normal file
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// CheckPermissionResultWithError Check Permission Result With Error
|
||||
type CheckPermissionResultWithError struct {
|
||||
// whether the relation tuple is allowed
|
||||
Allowed bool `json:"allowed"`
|
||||
// any error generated while checking the relation tuple
|
||||
Error *string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// NewCheckPermissionResultWithError instantiates a new CheckPermissionResultWithError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCheckPermissionResultWithError(allowed bool) *CheckPermissionResultWithError {
|
||||
this := CheckPermissionResultWithError{}
|
||||
this.Allowed = allowed
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCheckPermissionResultWithErrorWithDefaults instantiates a new CheckPermissionResultWithError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCheckPermissionResultWithErrorWithDefaults() *CheckPermissionResultWithError {
|
||||
this := CheckPermissionResultWithError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAllowed returns the Allowed field value
|
||||
func (o *CheckPermissionResultWithError) GetAllowed() bool {
|
||||
if o == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Allowed
|
||||
}
|
||||
|
||||
// GetAllowedOk returns a tuple with the Allowed field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CheckPermissionResultWithError) GetAllowedOk() (*bool, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Allowed, true
|
||||
}
|
||||
|
||||
// SetAllowed sets field value
|
||||
func (o *CheckPermissionResultWithError) SetAllowed(v bool) {
|
||||
o.Allowed = v
|
||||
}
|
||||
|
||||
// GetError returns the Error field value if set, zero value otherwise.
|
||||
func (o *CheckPermissionResultWithError) GetError() string {
|
||||
if o == nil || o.Error == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CheckPermissionResultWithError) GetErrorOk() (*string, bool) {
|
||||
if o == nil || o.Error == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Error, true
|
||||
}
|
||||
|
||||
// HasError returns a boolean if a field has been set.
|
||||
func (o *CheckPermissionResultWithError) HasError() bool {
|
||||
if o != nil && o.Error != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetError gets a reference to the given string and assigns it to the Error field.
|
||||
func (o *CheckPermissionResultWithError) SetError(v string) {
|
||||
o.Error = &v
|
||||
}
|
||||
|
||||
func (o CheckPermissionResultWithError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["allowed"] = o.Allowed
|
||||
}
|
||||
if o.Error != nil {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableCheckPermissionResultWithError struct {
|
||||
value *CheckPermissionResultWithError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResultWithError) Get() *CheckPermissionResultWithError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResultWithError) Set(val *CheckPermissionResultWithError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResultWithError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResultWithError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCheckPermissionResultWithError(val *CheckPermissionResultWithError) *NullableCheckPermissionResultWithError {
|
||||
return &NullableCheckPermissionResultWithError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCheckPermissionResultWithError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCheckPermissionResultWithError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
262
internal/httpclient/model_create_relationship_body.go
generated
Normal file
262
internal/httpclient/model_create_relationship_body.go
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// CreateRelationshipBody Create Relationship Request Body
|
||||
type CreateRelationshipBody struct {
|
||||
// Namespace to query
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// Object to query
|
||||
Object *string `json:"object,omitempty"`
|
||||
// Relation to query
|
||||
Relation *string `json:"relation,omitempty"`
|
||||
// SubjectID to query Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateRelationshipBody instantiates a new CreateRelationshipBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewCreateRelationshipBody() *CreateRelationshipBody {
|
||||
this := CreateRelationshipBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateRelationshipBodyWithDefaults instantiates a new CreateRelationshipBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewCreateRelationshipBodyWithDefaults() *CreateRelationshipBody {
|
||||
this := CreateRelationshipBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
||||
func (o *CreateRelationshipBody) GetNamespace() string {
|
||||
if o == nil || o.Namespace == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRelationshipBody) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil || o.Namespace == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Namespace, true
|
||||
}
|
||||
|
||||
// HasNamespace returns a boolean if a field has been set.
|
||||
func (o *CreateRelationshipBody) HasNamespace() bool {
|
||||
if o != nil && o.Namespace != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
||||
func (o *CreateRelationshipBody) SetNamespace(v string) {
|
||||
o.Namespace = &v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value if set, zero value otherwise.
|
||||
func (o *CreateRelationshipBody) GetObject() string {
|
||||
if o == nil || o.Object == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRelationshipBody) GetObjectOk() (*string, bool) {
|
||||
if o == nil || o.Object == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Object, true
|
||||
}
|
||||
|
||||
// HasObject returns a boolean if a field has been set.
|
||||
func (o *CreateRelationshipBody) HasObject() bool {
|
||||
if o != nil && o.Object != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObject gets a reference to the given string and assigns it to the Object field.
|
||||
func (o *CreateRelationshipBody) SetObject(v string) {
|
||||
o.Object = &v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value if set, zero value otherwise.
|
||||
func (o *CreateRelationshipBody) GetRelation() string {
|
||||
if o == nil || o.Relation == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRelationshipBody) GetRelationOk() (*string, bool) {
|
||||
if o == nil || o.Relation == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Relation, true
|
||||
}
|
||||
|
||||
// HasRelation returns a boolean if a field has been set.
|
||||
func (o *CreateRelationshipBody) HasRelation() bool {
|
||||
if o != nil && o.Relation != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelation gets a reference to the given string and assigns it to the Relation field.
|
||||
func (o *CreateRelationshipBody) SetRelation(v string) {
|
||||
o.Relation = &v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *CreateRelationshipBody) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRelationshipBody) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *CreateRelationshipBody) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *CreateRelationshipBody) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *CreateRelationshipBody) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateRelationshipBody) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *CreateRelationshipBody) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *CreateRelationshipBody) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o CreateRelationshipBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Namespace != nil {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if o.Object != nil {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if o.Relation != nil {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableCreateRelationshipBody struct {
|
||||
value *CreateRelationshipBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateRelationshipBody) Get() *CreateRelationshipBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateRelationshipBody) Set(val *CreateRelationshipBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateRelationshipBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateRelationshipBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateRelationshipBody(val *CreateRelationshipBody) *NullableCreateRelationshipBody {
|
||||
return &NullableCreateRelationshipBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateRelationshipBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateRelationshipBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
107
internal/httpclient/model_error_generic.go
generated
Normal file
107
internal/httpclient/model_error_generic.go
generated
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ErrorGeneric The standard Ory JSON API error format.
|
||||
type ErrorGeneric struct {
|
||||
Error GenericError `json:"error"`
|
||||
}
|
||||
|
||||
// NewErrorGeneric instantiates a new ErrorGeneric object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewErrorGeneric(error_ GenericError) *ErrorGeneric {
|
||||
this := ErrorGeneric{}
|
||||
this.Error = error_
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorGenericWithDefaults instantiates a new ErrorGeneric object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewErrorGenericWithDefaults() *ErrorGeneric {
|
||||
this := ErrorGeneric{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetError returns the Error field value
|
||||
func (o *ErrorGeneric) GetError() GenericError {
|
||||
if o == nil {
|
||||
var ret GenericError
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Error
|
||||
}
|
||||
|
||||
// GetErrorOk returns a tuple with the Error field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ErrorGeneric) GetErrorOk() (*GenericError, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Error, true
|
||||
}
|
||||
|
||||
// SetError sets field value
|
||||
func (o *ErrorGeneric) SetError(v GenericError) {
|
||||
o.Error = v
|
||||
}
|
||||
|
||||
func (o ErrorGeneric) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["error"] = o.Error
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableErrorGeneric struct {
|
||||
value *ErrorGeneric
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) Get() *ErrorGeneric {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) Set(val *ErrorGeneric) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableErrorGeneric(val *ErrorGeneric) *NullableErrorGeneric {
|
||||
return &NullableErrorGeneric{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableErrorGeneric) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableErrorGeneric) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
181
internal/httpclient/model_expanded_permission_tree.go
generated
Normal file
181
internal/httpclient/model_expanded_permission_tree.go
generated
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ExpandedPermissionTree struct for ExpandedPermissionTree
|
||||
type ExpandedPermissionTree struct {
|
||||
// The children of the node, possibly none.
|
||||
Children []ExpandedPermissionTree `json:"children,omitempty"`
|
||||
Tuple *Relationship `json:"tuple,omitempty"`
|
||||
// The type of the node. union TreeNodeUnion exclusion TreeNodeExclusion intersection TreeNodeIntersection leaf TreeNodeLeaf tuple_to_subject_set TreeNodeTupleToSubjectSet computed_subject_set TreeNodeComputedSubjectSet not TreeNodeNot unspecified TreeNodeUnspecified
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// NewExpandedPermissionTree instantiates a new ExpandedPermissionTree object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewExpandedPermissionTree(type_ string) *ExpandedPermissionTree {
|
||||
this := ExpandedPermissionTree{}
|
||||
this.Type = type_
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewExpandedPermissionTreeWithDefaults instantiates a new ExpandedPermissionTree object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewExpandedPermissionTreeWithDefaults() *ExpandedPermissionTree {
|
||||
this := ExpandedPermissionTree{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetChildren returns the Children field value if set, zero value otherwise.
|
||||
func (o *ExpandedPermissionTree) GetChildren() []ExpandedPermissionTree {
|
||||
if o == nil || o.Children == nil {
|
||||
var ret []ExpandedPermissionTree
|
||||
return ret
|
||||
}
|
||||
return o.Children
|
||||
}
|
||||
|
||||
// GetChildrenOk returns a tuple with the Children field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ExpandedPermissionTree) GetChildrenOk() ([]ExpandedPermissionTree, bool) {
|
||||
if o == nil || o.Children == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Children, true
|
||||
}
|
||||
|
||||
// HasChildren returns a boolean if a field has been set.
|
||||
func (o *ExpandedPermissionTree) HasChildren() bool {
|
||||
if o != nil && o.Children != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetChildren gets a reference to the given []ExpandedPermissionTree and assigns it to the Children field.
|
||||
func (o *ExpandedPermissionTree) SetChildren(v []ExpandedPermissionTree) {
|
||||
o.Children = v
|
||||
}
|
||||
|
||||
// GetTuple returns the Tuple field value if set, zero value otherwise.
|
||||
func (o *ExpandedPermissionTree) GetTuple() Relationship {
|
||||
if o == nil || o.Tuple == nil {
|
||||
var ret Relationship
|
||||
return ret
|
||||
}
|
||||
return *o.Tuple
|
||||
}
|
||||
|
||||
// GetTupleOk returns a tuple with the Tuple field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ExpandedPermissionTree) GetTupleOk() (*Relationship, bool) {
|
||||
if o == nil || o.Tuple == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Tuple, true
|
||||
}
|
||||
|
||||
// HasTuple returns a boolean if a field has been set.
|
||||
func (o *ExpandedPermissionTree) HasTuple() bool {
|
||||
if o != nil && o.Tuple != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetTuple gets a reference to the given Relationship and assigns it to the Tuple field.
|
||||
func (o *ExpandedPermissionTree) SetTuple(v Relationship) {
|
||||
o.Tuple = &v
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *ExpandedPermissionTree) GetType() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Type
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ExpandedPermissionTree) GetTypeOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Type, true
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *ExpandedPermissionTree) SetType(v string) {
|
||||
o.Type = v
|
||||
}
|
||||
|
||||
func (o ExpandedPermissionTree) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Children != nil {
|
||||
toSerialize["children"] = o.Children
|
||||
}
|
||||
if o.Tuple != nil {
|
||||
toSerialize["tuple"] = o.Tuple
|
||||
}
|
||||
if true {
|
||||
toSerialize["type"] = o.Type
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableExpandedPermissionTree struct {
|
||||
value *ExpandedPermissionTree
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableExpandedPermissionTree) Get() *ExpandedPermissionTree {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableExpandedPermissionTree) Set(val *ExpandedPermissionTree) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableExpandedPermissionTree) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableExpandedPermissionTree) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableExpandedPermissionTree(val *ExpandedPermissionTree) *NullableExpandedPermissionTree {
|
||||
return &NullableExpandedPermissionTree{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableExpandedPermissionTree) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableExpandedPermissionTree) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
367
internal/httpclient/model_generic_error.go
generated
Normal file
367
internal/httpclient/model_generic_error.go
generated
Normal file
@@ -0,0 +1,367 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// GenericError struct for GenericError
|
||||
type GenericError struct {
|
||||
// The status code
|
||||
Code *int64 `json:"code,omitempty"`
|
||||
// Debug information This field is often not exposed to protect against leaking sensitive information.
|
||||
Debug *string `json:"debug,omitempty"`
|
||||
// Further error details
|
||||
Details map[string]interface{} `json:"details,omitempty"`
|
||||
// The error ID Useful when trying to identify various errors in application logic.
|
||||
Id *string `json:"id,omitempty"`
|
||||
// Error message The error's message.
|
||||
Message string `json:"message"`
|
||||
// A human-readable reason for the error
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
// The request ID The request ID is often exposed internally in order to trace errors across service architectures. This is often a UUID.
|
||||
Request *string `json:"request,omitempty"`
|
||||
// The status description
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewGenericError instantiates a new GenericError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewGenericError(message string) *GenericError {
|
||||
this := GenericError{}
|
||||
this.Message = message
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGenericErrorWithDefaults instantiates a new GenericError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewGenericErrorWithDefaults() *GenericError {
|
||||
this := GenericError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetCode() int64 {
|
||||
if o == nil || o.Code == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Code
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetCodeOk() (*int64, bool) {
|
||||
if o == nil || o.Code == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Code, true
|
||||
}
|
||||
|
||||
// HasCode returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasCode() bool {
|
||||
if o != nil && o.Code != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetCode gets a reference to the given int64 and assigns it to the Code field.
|
||||
func (o *GenericError) SetCode(v int64) {
|
||||
o.Code = &v
|
||||
}
|
||||
|
||||
// GetDebug returns the Debug field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDebug() string {
|
||||
if o == nil || o.Debug == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Debug
|
||||
}
|
||||
|
||||
// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDebugOk() (*string, bool) {
|
||||
if o == nil || o.Debug == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Debug, true
|
||||
}
|
||||
|
||||
// HasDebug returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDebug() bool {
|
||||
if o != nil && o.Debug != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDebug gets a reference to the given string and assigns it to the Debug field.
|
||||
func (o *GenericError) SetDebug(v string) {
|
||||
o.Debug = &v
|
||||
}
|
||||
|
||||
// GetDetails returns the Details field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetDetails() map[string]interface{} {
|
||||
if o == nil || o.Details == nil {
|
||||
var ret map[string]interface{}
|
||||
return ret
|
||||
}
|
||||
return o.Details
|
||||
}
|
||||
|
||||
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetDetailsOk() (map[string]interface{}, bool) {
|
||||
if o == nil || o.Details == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Details, true
|
||||
}
|
||||
|
||||
// HasDetails returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasDetails() bool {
|
||||
if o != nil && o.Details != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field.
|
||||
func (o *GenericError) SetDetails(v map[string]interface{}) {
|
||||
o.Details = v
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetId() string {
|
||||
if o == nil || o.Id == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Id
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetIdOk() (*string, bool) {
|
||||
if o == nil || o.Id == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Id, true
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasId() bool {
|
||||
if o != nil && o.Id != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *GenericError) SetId(v string) {
|
||||
o.Id = &v
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value
|
||||
func (o *GenericError) GetMessage() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetMessageOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Message, true
|
||||
}
|
||||
|
||||
// SetMessage sets field value
|
||||
func (o *GenericError) SetMessage(v string) {
|
||||
o.Message = v
|
||||
}
|
||||
|
||||
// GetReason returns the Reason field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetReason() string {
|
||||
if o == nil || o.Reason == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Reason
|
||||
}
|
||||
|
||||
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetReasonOk() (*string, bool) {
|
||||
if o == nil || o.Reason == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Reason, true
|
||||
}
|
||||
|
||||
// HasReason returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasReason() bool {
|
||||
if o != nil && o.Reason != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
||||
func (o *GenericError) SetReason(v string) {
|
||||
o.Reason = &v
|
||||
}
|
||||
|
||||
// GetRequest returns the Request field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetRequest() string {
|
||||
if o == nil || o.Request == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Request
|
||||
}
|
||||
|
||||
// GetRequestOk returns a tuple with the Request field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetRequestOk() (*string, bool) {
|
||||
if o == nil || o.Request == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Request, true
|
||||
}
|
||||
|
||||
// HasRequest returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasRequest() bool {
|
||||
if o != nil && o.Request != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRequest gets a reference to the given string and assigns it to the Request field.
|
||||
func (o *GenericError) SetRequest(v string) {
|
||||
o.Request = &v
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *GenericError) GetStatus() string {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GenericError) GetStatusOk() (*string, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *GenericError) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *GenericError) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o GenericError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Code != nil {
|
||||
toSerialize["code"] = o.Code
|
||||
}
|
||||
if o.Debug != nil {
|
||||
toSerialize["debug"] = o.Debug
|
||||
}
|
||||
if o.Details != nil {
|
||||
toSerialize["details"] = o.Details
|
||||
}
|
||||
if o.Id != nil {
|
||||
toSerialize["id"] = o.Id
|
||||
}
|
||||
if true {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if o.Reason != nil {
|
||||
toSerialize["reason"] = o.Reason
|
||||
}
|
||||
if o.Request != nil {
|
||||
toSerialize["request"] = o.Request
|
||||
}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableGenericError struct {
|
||||
value *GenericError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGenericError) Get() *GenericError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Set(val *GenericError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGenericError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGenericError(val *GenericError) *NullableGenericError {
|
||||
return &NullableGenericError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGenericError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGenericError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
108
internal/httpclient/model_get_version_200_response.go
generated
Normal file
108
internal/httpclient/model_get_version_200_response.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// GetVersion200Response struct for GetVersion200Response
|
||||
type GetVersion200Response struct {
|
||||
// The version of Ory Keto.
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
||||
// NewGetVersion200Response instantiates a new GetVersion200Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewGetVersion200Response(version string) *GetVersion200Response {
|
||||
this := GetVersion200Response{}
|
||||
this.Version = version
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetVersion200ResponseWithDefaults instantiates a new GetVersion200Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewGetVersion200ResponseWithDefaults() *GetVersion200Response {
|
||||
this := GetVersion200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value
|
||||
func (o *GetVersion200Response) GetVersion() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetVersion200Response) GetVersionOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Version, true
|
||||
}
|
||||
|
||||
// SetVersion sets field value
|
||||
func (o *GetVersion200Response) SetVersion(v string) {
|
||||
o.Version = v
|
||||
}
|
||||
|
||||
func (o GetVersion200Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["version"] = o.Version
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableGetVersion200Response struct {
|
||||
value *GetVersion200Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) Get() *GetVersion200Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) Set(val *GetVersion200Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetVersion200Response(val *GetVersion200Response) *NullableGetVersion200Response {
|
||||
return &NullableGetVersion200Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetVersion200Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetVersion200Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
internal/httpclient/model_health_not_ready_status.go
generated
Normal file
115
internal/httpclient/model_health_not_ready_status.go
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// HealthNotReadyStatus struct for HealthNotReadyStatus
|
||||
type HealthNotReadyStatus struct {
|
||||
// Errors contains a list of errors that caused the not ready status.
|
||||
Errors *map[string]string `json:"errors,omitempty"`
|
||||
}
|
||||
|
||||
// NewHealthNotReadyStatus instantiates a new HealthNotReadyStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewHealthNotReadyStatus() *HealthNotReadyStatus {
|
||||
this := HealthNotReadyStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHealthNotReadyStatusWithDefaults instantiates a new HealthNotReadyStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewHealthNotReadyStatusWithDefaults() *HealthNotReadyStatus {
|
||||
this := HealthNotReadyStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetErrors returns the Errors field value if set, zero value otherwise.
|
||||
func (o *HealthNotReadyStatus) GetErrors() map[string]string {
|
||||
if o == nil || o.Errors == nil {
|
||||
var ret map[string]string
|
||||
return ret
|
||||
}
|
||||
return *o.Errors
|
||||
}
|
||||
|
||||
// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HealthNotReadyStatus) GetErrorsOk() (*map[string]string, bool) {
|
||||
if o == nil || o.Errors == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Errors, true
|
||||
}
|
||||
|
||||
// HasErrors returns a boolean if a field has been set.
|
||||
func (o *HealthNotReadyStatus) HasErrors() bool {
|
||||
if o != nil && o.Errors != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetErrors gets a reference to the given map[string]string and assigns it to the Errors field.
|
||||
func (o *HealthNotReadyStatus) SetErrors(v map[string]string) {
|
||||
o.Errors = &v
|
||||
}
|
||||
|
||||
func (o HealthNotReadyStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Errors != nil {
|
||||
toSerialize["errors"] = o.Errors
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableHealthNotReadyStatus struct {
|
||||
value *HealthNotReadyStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) Get() *HealthNotReadyStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) Set(val *HealthNotReadyStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHealthNotReadyStatus(val *HealthNotReadyStatus) *NullableHealthNotReadyStatus {
|
||||
return &NullableHealthNotReadyStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHealthNotReadyStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHealthNotReadyStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
internal/httpclient/model_health_status.go
generated
Normal file
115
internal/httpclient/model_health_status.go
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// HealthStatus struct for HealthStatus
|
||||
type HealthStatus struct {
|
||||
// Status always contains \"ok\".
|
||||
Status *string `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// NewHealthStatus instantiates a new HealthStatus object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewHealthStatus() *HealthStatus {
|
||||
this := HealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewHealthStatusWithDefaults instantiates a new HealthStatus object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewHealthStatusWithDefaults() *HealthStatus {
|
||||
this := HealthStatus{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *HealthStatus) GetStatus() string {
|
||||
if o == nil || o.Status == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *HealthStatus) GetStatusOk() (*string, bool) {
|
||||
if o == nil || o.Status == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Status, true
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *HealthStatus) HasStatus() bool {
|
||||
if o != nil && o.Status != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *HealthStatus) SetStatus(v string) {
|
||||
o.Status = &v
|
||||
}
|
||||
|
||||
func (o HealthStatus) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Status != nil {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableHealthStatus struct {
|
||||
value *HealthStatus
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) Get() *HealthStatus {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) Set(val *HealthStatus) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableHealthStatus(val *HealthStatus) *NullableHealthStatus {
|
||||
return &NullableHealthStatus{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableHealthStatus) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableHealthStatus) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
108
internal/httpclient/model_is_alive_200_response.go
generated
Normal file
108
internal/httpclient/model_is_alive_200_response.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// IsAlive200Response struct for IsAlive200Response
|
||||
type IsAlive200Response struct {
|
||||
// Always \"ok\".
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// NewIsAlive200Response instantiates a new IsAlive200Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIsAlive200Response(status string) *IsAlive200Response {
|
||||
this := IsAlive200Response{}
|
||||
this.Status = status
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIsAlive200ResponseWithDefaults instantiates a new IsAlive200Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIsAlive200ResponseWithDefaults() *IsAlive200Response {
|
||||
this := IsAlive200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *IsAlive200Response) GetStatus() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Status
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IsAlive200Response) GetStatusOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Status, true
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *IsAlive200Response) SetStatus(v string) {
|
||||
o.Status = v
|
||||
}
|
||||
|
||||
func (o IsAlive200Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["status"] = o.Status
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableIsAlive200Response struct {
|
||||
value *IsAlive200Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) Get() *IsAlive200Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) Set(val *IsAlive200Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIsAlive200Response(val *IsAlive200Response) *NullableIsAlive200Response {
|
||||
return &NullableIsAlive200Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIsAlive200Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIsAlive200Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
108
internal/httpclient/model_is_ready_503_response.go
generated
Normal file
108
internal/httpclient/model_is_ready_503_response.go
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// IsReady503Response struct for IsReady503Response
|
||||
type IsReady503Response struct {
|
||||
// Errors contains a list of errors that caused the not ready status.
|
||||
Errors map[string]string `json:"errors"`
|
||||
}
|
||||
|
||||
// NewIsReady503Response instantiates a new IsReady503Response object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewIsReady503Response(errors map[string]string) *IsReady503Response {
|
||||
this := IsReady503Response{}
|
||||
this.Errors = errors
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewIsReady503ResponseWithDefaults instantiates a new IsReady503Response object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewIsReady503ResponseWithDefaults() *IsReady503Response {
|
||||
this := IsReady503Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetErrors returns the Errors field value
|
||||
func (o *IsReady503Response) GetErrors() map[string]string {
|
||||
if o == nil {
|
||||
var ret map[string]string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Errors
|
||||
}
|
||||
|
||||
// GetErrorsOk returns a tuple with the Errors field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *IsReady503Response) GetErrorsOk() (*map[string]string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Errors, true
|
||||
}
|
||||
|
||||
// SetErrors sets field value
|
||||
func (o *IsReady503Response) SetErrors(v map[string]string) {
|
||||
o.Errors = v
|
||||
}
|
||||
|
||||
func (o IsReady503Response) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["errors"] = o.Errors
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableIsReady503Response struct {
|
||||
value *IsReady503Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) Get() *IsReady503Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) Set(val *IsReady503Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableIsReady503Response(val *IsReady503Response) *NullableIsReady503Response {
|
||||
return &NullableIsReady503Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableIsReady503Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableIsReady503Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
internal/httpclient/model_namespace.go
generated
Normal file
115
internal/httpclient/model_namespace.go
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Namespace struct for Namespace
|
||||
type Namespace struct {
|
||||
// Name of the namespace.
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// NewNamespace instantiates a new Namespace object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewNamespace() *Namespace {
|
||||
this := Namespace{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewNamespaceWithDefaults instantiates a new Namespace object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewNamespaceWithDefaults() *Namespace {
|
||||
this := Namespace{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *Namespace) GetName() string {
|
||||
if o == nil || o.Name == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Name
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Namespace) GetNameOk() (*string, bool) {
|
||||
if o == nil || o.Name == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Name, true
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *Namespace) HasName() bool {
|
||||
if o != nil && o.Name != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *Namespace) SetName(v string) {
|
||||
o.Name = &v
|
||||
}
|
||||
|
||||
func (o Namespace) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Name != nil {
|
||||
toSerialize["name"] = o.Name
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableNamespace struct {
|
||||
value *Namespace
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableNamespace) Get() *Namespace {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableNamespace) Set(val *Namespace) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableNamespace) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableNamespace) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableNamespace(val *Namespace) *NullableNamespace {
|
||||
return &NullableNamespace{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableNamespace) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableNamespace) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
186
internal/httpclient/model_parse_error.go
generated
Normal file
186
internal/httpclient/model_parse_error.go
generated
Normal file
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// ParseError struct for ParseError
|
||||
type ParseError struct {
|
||||
End *SourcePosition `json:"end,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Start *SourcePosition `json:"start,omitempty"`
|
||||
}
|
||||
|
||||
// NewParseError instantiates a new ParseError object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewParseError() *ParseError {
|
||||
this := ParseError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewParseErrorWithDefaults instantiates a new ParseError object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewParseErrorWithDefaults() *ParseError {
|
||||
this := ParseError{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetEnd returns the End field value if set, zero value otherwise.
|
||||
func (o *ParseError) GetEnd() SourcePosition {
|
||||
if o == nil || o.End == nil {
|
||||
var ret SourcePosition
|
||||
return ret
|
||||
}
|
||||
return *o.End
|
||||
}
|
||||
|
||||
// GetEndOk returns a tuple with the End field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ParseError) GetEndOk() (*SourcePosition, bool) {
|
||||
if o == nil || o.End == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.End, true
|
||||
}
|
||||
|
||||
// HasEnd returns a boolean if a field has been set.
|
||||
func (o *ParseError) HasEnd() bool {
|
||||
if o != nil && o.End != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetEnd gets a reference to the given SourcePosition and assigns it to the End field.
|
||||
func (o *ParseError) SetEnd(v SourcePosition) {
|
||||
o.End = &v
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value if set, zero value otherwise.
|
||||
func (o *ParseError) GetMessage() string {
|
||||
if o == nil || o.Message == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Message
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ParseError) GetMessageOk() (*string, bool) {
|
||||
if o == nil || o.Message == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Message, true
|
||||
}
|
||||
|
||||
// HasMessage returns a boolean if a field has been set.
|
||||
func (o *ParseError) HasMessage() bool {
|
||||
if o != nil && o.Message != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
||||
func (o *ParseError) SetMessage(v string) {
|
||||
o.Message = &v
|
||||
}
|
||||
|
||||
// GetStart returns the Start field value if set, zero value otherwise.
|
||||
func (o *ParseError) GetStart() SourcePosition {
|
||||
if o == nil || o.Start == nil {
|
||||
var ret SourcePosition
|
||||
return ret
|
||||
}
|
||||
return *o.Start
|
||||
}
|
||||
|
||||
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ParseError) GetStartOk() (*SourcePosition, bool) {
|
||||
if o == nil || o.Start == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Start, true
|
||||
}
|
||||
|
||||
// HasStart returns a boolean if a field has been set.
|
||||
func (o *ParseError) HasStart() bool {
|
||||
if o != nil && o.Start != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetStart gets a reference to the given SourcePosition and assigns it to the Start field.
|
||||
func (o *ParseError) SetStart(v SourcePosition) {
|
||||
o.Start = &v
|
||||
}
|
||||
|
||||
func (o ParseError) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.End != nil {
|
||||
toSerialize["end"] = o.End
|
||||
}
|
||||
if o.Message != nil {
|
||||
toSerialize["message"] = o.Message
|
||||
}
|
||||
if o.Start != nil {
|
||||
toSerialize["start"] = o.Start
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableParseError struct {
|
||||
value *ParseError
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableParseError) Get() *ParseError {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableParseError) Set(val *ParseError) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableParseError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableParseError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableParseError(val *ParseError) *NullableParseError {
|
||||
return &NullableParseError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableParseError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableParseError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
262
internal/httpclient/model_post_check_permission_body.go
generated
Normal file
262
internal/httpclient/model_post_check_permission_body.go
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// PostCheckPermissionBody Check Permission using Post Request Body
|
||||
type PostCheckPermissionBody struct {
|
||||
// Namespace to query
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// Object to query
|
||||
Object *string `json:"object,omitempty"`
|
||||
// Relation to query
|
||||
Relation *string `json:"relation,omitempty"`
|
||||
// SubjectID to query Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewPostCheckPermissionBody instantiates a new PostCheckPermissionBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewPostCheckPermissionBody() *PostCheckPermissionBody {
|
||||
this := PostCheckPermissionBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPostCheckPermissionBodyWithDefaults instantiates a new PostCheckPermissionBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewPostCheckPermissionBodyWithDefaults() *PostCheckPermissionBody {
|
||||
this := PostCheckPermissionBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionBody) GetNamespace() string {
|
||||
if o == nil || o.Namespace == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionBody) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil || o.Namespace == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Namespace, true
|
||||
}
|
||||
|
||||
// HasNamespace returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionBody) HasNamespace() bool {
|
||||
if o != nil && o.Namespace != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
||||
func (o *PostCheckPermissionBody) SetNamespace(v string) {
|
||||
o.Namespace = &v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionBody) GetObject() string {
|
||||
if o == nil || o.Object == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionBody) GetObjectOk() (*string, bool) {
|
||||
if o == nil || o.Object == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Object, true
|
||||
}
|
||||
|
||||
// HasObject returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionBody) HasObject() bool {
|
||||
if o != nil && o.Object != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObject gets a reference to the given string and assigns it to the Object field.
|
||||
func (o *PostCheckPermissionBody) SetObject(v string) {
|
||||
o.Object = &v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionBody) GetRelation() string {
|
||||
if o == nil || o.Relation == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionBody) GetRelationOk() (*string, bool) {
|
||||
if o == nil || o.Relation == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Relation, true
|
||||
}
|
||||
|
||||
// HasRelation returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionBody) HasRelation() bool {
|
||||
if o != nil && o.Relation != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelation gets a reference to the given string and assigns it to the Relation field.
|
||||
func (o *PostCheckPermissionBody) SetRelation(v string) {
|
||||
o.Relation = &v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionBody) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionBody) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionBody) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *PostCheckPermissionBody) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionBody) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionBody) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionBody) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *PostCheckPermissionBody) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o PostCheckPermissionBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Namespace != nil {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if o.Object != nil {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if o.Relation != nil {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullablePostCheckPermissionBody struct {
|
||||
value *PostCheckPermissionBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionBody) Get() *PostCheckPermissionBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionBody) Set(val *PostCheckPermissionBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePostCheckPermissionBody(val *PostCheckPermissionBody) *NullablePostCheckPermissionBody {
|
||||
return &NullablePostCheckPermissionBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
262
internal/httpclient/model_post_check_permission_or_error_body.go
generated
Normal file
262
internal/httpclient/model_post_check_permission_or_error_body.go
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// PostCheckPermissionOrErrorBody Post Check Permission Or Error Body
|
||||
type PostCheckPermissionOrErrorBody struct {
|
||||
// Namespace to query
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// Object to query
|
||||
Object *string `json:"object,omitempty"`
|
||||
// Relation to query
|
||||
Relation *string `json:"relation,omitempty"`
|
||||
// SubjectID to query Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewPostCheckPermissionOrErrorBody instantiates a new PostCheckPermissionOrErrorBody object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewPostCheckPermissionOrErrorBody() *PostCheckPermissionOrErrorBody {
|
||||
this := PostCheckPermissionOrErrorBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPostCheckPermissionOrErrorBodyWithDefaults instantiates a new PostCheckPermissionOrErrorBody object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewPostCheckPermissionOrErrorBodyWithDefaults() *PostCheckPermissionOrErrorBody {
|
||||
this := PostCheckPermissionOrErrorBody{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetNamespace() string {
|
||||
if o == nil || o.Namespace == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil || o.Namespace == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Namespace, true
|
||||
}
|
||||
|
||||
// HasNamespace returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) HasNamespace() bool {
|
||||
if o != nil && o.Namespace != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
||||
func (o *PostCheckPermissionOrErrorBody) SetNamespace(v string) {
|
||||
o.Namespace = &v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetObject() string {
|
||||
if o == nil || o.Object == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetObjectOk() (*string, bool) {
|
||||
if o == nil || o.Object == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Object, true
|
||||
}
|
||||
|
||||
// HasObject returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) HasObject() bool {
|
||||
if o != nil && o.Object != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObject gets a reference to the given string and assigns it to the Object field.
|
||||
func (o *PostCheckPermissionOrErrorBody) SetObject(v string) {
|
||||
o.Object = &v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetRelation() string {
|
||||
if o == nil || o.Relation == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetRelationOk() (*string, bool) {
|
||||
if o == nil || o.Relation == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Relation, true
|
||||
}
|
||||
|
||||
// HasRelation returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) HasRelation() bool {
|
||||
if o != nil && o.Relation != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelation gets a reference to the given string and assigns it to the Relation field.
|
||||
func (o *PostCheckPermissionOrErrorBody) SetRelation(v string) {
|
||||
o.Relation = &v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *PostCheckPermissionOrErrorBody) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *PostCheckPermissionOrErrorBody) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *PostCheckPermissionOrErrorBody) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o PostCheckPermissionOrErrorBody) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Namespace != nil {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if o.Object != nil {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if o.Relation != nil {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullablePostCheckPermissionOrErrorBody struct {
|
||||
value *PostCheckPermissionOrErrorBody
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionOrErrorBody) Get() *PostCheckPermissionOrErrorBody {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionOrErrorBody) Set(val *PostCheckPermissionOrErrorBody) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionOrErrorBody) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionOrErrorBody) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePostCheckPermissionOrErrorBody(val *PostCheckPermissionOrErrorBody) *NullablePostCheckPermissionOrErrorBody {
|
||||
return &NullablePostCheckPermissionOrErrorBody{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePostCheckPermissionOrErrorBody) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePostCheckPermissionOrErrorBody) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
262
internal/httpclient/model_relation_query.go
generated
Normal file
262
internal/httpclient/model_relation_query.go
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// RelationQuery Relation Query
|
||||
type RelationQuery struct {
|
||||
// Namespace to query
|
||||
Namespace *string `json:"namespace,omitempty"`
|
||||
// Object to query
|
||||
Object *string `json:"object,omitempty"`
|
||||
// Relation to query
|
||||
Relation *string `json:"relation,omitempty"`
|
||||
// SubjectID to query Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationQuery instantiates a new RelationQuery object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRelationQuery() *RelationQuery {
|
||||
this := RelationQuery{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationQueryWithDefaults instantiates a new RelationQuery object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRelationQueryWithDefaults() *RelationQuery {
|
||||
this := RelationQuery{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
||||
func (o *RelationQuery) GetNamespace() string {
|
||||
if o == nil || o.Namespace == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationQuery) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil || o.Namespace == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Namespace, true
|
||||
}
|
||||
|
||||
// HasNamespace returns a boolean if a field has been set.
|
||||
func (o *RelationQuery) HasNamespace() bool {
|
||||
if o != nil && o.Namespace != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
||||
func (o *RelationQuery) SetNamespace(v string) {
|
||||
o.Namespace = &v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value if set, zero value otherwise.
|
||||
func (o *RelationQuery) GetObject() string {
|
||||
if o == nil || o.Object == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationQuery) GetObjectOk() (*string, bool) {
|
||||
if o == nil || o.Object == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Object, true
|
||||
}
|
||||
|
||||
// HasObject returns a boolean if a field has been set.
|
||||
func (o *RelationQuery) HasObject() bool {
|
||||
if o != nil && o.Object != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetObject gets a reference to the given string and assigns it to the Object field.
|
||||
func (o *RelationQuery) SetObject(v string) {
|
||||
o.Object = &v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value if set, zero value otherwise.
|
||||
func (o *RelationQuery) GetRelation() string {
|
||||
if o == nil || o.Relation == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationQuery) GetRelationOk() (*string, bool) {
|
||||
if o == nil || o.Relation == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Relation, true
|
||||
}
|
||||
|
||||
// HasRelation returns a boolean if a field has been set.
|
||||
func (o *RelationQuery) HasRelation() bool {
|
||||
if o != nil && o.Relation != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelation gets a reference to the given string and assigns it to the Relation field.
|
||||
func (o *RelationQuery) SetRelation(v string) {
|
||||
o.Relation = &v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *RelationQuery) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationQuery) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *RelationQuery) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *RelationQuery) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *RelationQuery) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationQuery) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *RelationQuery) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *RelationQuery) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o RelationQuery) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Namespace != nil {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if o.Object != nil {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if o.Relation != nil {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationQuery struct {
|
||||
value *RelationQuery
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationQuery) Get() *RelationQuery {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationQuery) Set(val *RelationQuery) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationQuery) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationQuery) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationQuery(val *RelationQuery) *NullableRelationQuery {
|
||||
return &NullableRelationQuery{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationQuery) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationQuery) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
241
internal/httpclient/model_relationship.go
generated
Normal file
241
internal/httpclient/model_relationship.go
generated
Normal file
@@ -0,0 +1,241 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Relationship Relationship
|
||||
type Relationship struct {
|
||||
// Namespace of the Relation Tuple
|
||||
Namespace string `json:"namespace"`
|
||||
// Object of the Relation Tuple
|
||||
Object string `json:"object"`
|
||||
// Relation of the Relation Tuple
|
||||
Relation string `json:"relation"`
|
||||
// SubjectID of the Relation Tuple Either SubjectSet or SubjectID can be provided.
|
||||
SubjectId *string `json:"subject_id,omitempty"`
|
||||
SubjectSet *SubjectSet `json:"subject_set,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationship instantiates a new Relationship object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRelationship(namespace string, object string, relation string) *Relationship {
|
||||
this := Relationship{}
|
||||
this.Namespace = namespace
|
||||
this.Object = object
|
||||
this.Relation = relation
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationshipWithDefaults instantiates a new Relationship object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRelationshipWithDefaults() *Relationship {
|
||||
this := Relationship{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value
|
||||
func (o *Relationship) GetNamespace() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Namespace, true
|
||||
}
|
||||
|
||||
// SetNamespace sets field value
|
||||
func (o *Relationship) SetNamespace(v string) {
|
||||
o.Namespace = v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value
|
||||
func (o *Relationship) GetObject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetObjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Object, true
|
||||
}
|
||||
|
||||
// SetObject sets field value
|
||||
func (o *Relationship) SetObject(v string) {
|
||||
o.Object = v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value
|
||||
func (o *Relationship) GetRelation() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetRelationOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Relation, true
|
||||
}
|
||||
|
||||
// SetRelation sets field value
|
||||
func (o *Relationship) SetRelation(v string) {
|
||||
o.Relation = v
|
||||
}
|
||||
|
||||
// GetSubjectId returns the SubjectId field value if set, zero value otherwise.
|
||||
func (o *Relationship) GetSubjectId() string {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectId
|
||||
}
|
||||
|
||||
// GetSubjectIdOk returns a tuple with the SubjectId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetSubjectIdOk() (*string, bool) {
|
||||
if o == nil || o.SubjectId == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectId, true
|
||||
}
|
||||
|
||||
// HasSubjectId returns a boolean if a field has been set.
|
||||
func (o *Relationship) HasSubjectId() bool {
|
||||
if o != nil && o.SubjectId != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectId gets a reference to the given string and assigns it to the SubjectId field.
|
||||
func (o *Relationship) SetSubjectId(v string) {
|
||||
o.SubjectId = &v
|
||||
}
|
||||
|
||||
// GetSubjectSet returns the SubjectSet field value if set, zero value otherwise.
|
||||
func (o *Relationship) GetSubjectSet() SubjectSet {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
var ret SubjectSet
|
||||
return ret
|
||||
}
|
||||
return *o.SubjectSet
|
||||
}
|
||||
|
||||
// GetSubjectSetOk returns a tuple with the SubjectSet field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationship) GetSubjectSetOk() (*SubjectSet, bool) {
|
||||
if o == nil || o.SubjectSet == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.SubjectSet, true
|
||||
}
|
||||
|
||||
// HasSubjectSet returns a boolean if a field has been set.
|
||||
func (o *Relationship) HasSubjectSet() bool {
|
||||
if o != nil && o.SubjectSet != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetSubjectSet gets a reference to the given SubjectSet and assigns it to the SubjectSet field.
|
||||
func (o *Relationship) SetSubjectSet(v SubjectSet) {
|
||||
o.SubjectSet = &v
|
||||
}
|
||||
|
||||
func (o Relationship) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if true {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if true {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
if o.SubjectId != nil {
|
||||
toSerialize["subject_id"] = o.SubjectId
|
||||
}
|
||||
if o.SubjectSet != nil {
|
||||
toSerialize["subject_set"] = o.SubjectSet
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationship struct {
|
||||
value *Relationship
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationship) Get() *Relationship {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) Set(val *Relationship) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationship) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationship(val *Relationship) *NullableRelationship {
|
||||
return &NullableRelationship{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationship) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationship) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
114
internal/httpclient/model_relationship_namespaces.go
generated
Normal file
114
internal/httpclient/model_relationship_namespaces.go
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// RelationshipNamespaces Relationship Namespace List
|
||||
type RelationshipNamespaces struct {
|
||||
Namespaces []Namespace `json:"namespaces,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationshipNamespaces instantiates a new RelationshipNamespaces object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRelationshipNamespaces() *RelationshipNamespaces {
|
||||
this := RelationshipNamespaces{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationshipNamespacesWithDefaults instantiates a new RelationshipNamespaces object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRelationshipNamespacesWithDefaults() *RelationshipNamespaces {
|
||||
this := RelationshipNamespaces{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespaces returns the Namespaces field value if set, zero value otherwise.
|
||||
func (o *RelationshipNamespaces) GetNamespaces() []Namespace {
|
||||
if o == nil || o.Namespaces == nil {
|
||||
var ret []Namespace
|
||||
return ret
|
||||
}
|
||||
return o.Namespaces
|
||||
}
|
||||
|
||||
// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationshipNamespaces) GetNamespacesOk() ([]Namespace, bool) {
|
||||
if o == nil || o.Namespaces == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Namespaces, true
|
||||
}
|
||||
|
||||
// HasNamespaces returns a boolean if a field has been set.
|
||||
func (o *RelationshipNamespaces) HasNamespaces() bool {
|
||||
if o != nil && o.Namespaces != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNamespaces gets a reference to the given []Namespace and assigns it to the Namespaces field.
|
||||
func (o *RelationshipNamespaces) SetNamespaces(v []Namespace) {
|
||||
o.Namespaces = v
|
||||
}
|
||||
|
||||
func (o RelationshipNamespaces) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Namespaces != nil {
|
||||
toSerialize["namespaces"] = o.Namespaces
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationshipNamespaces struct {
|
||||
value *RelationshipNamespaces
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationshipNamespaces) Get() *RelationshipNamespaces {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipNamespaces) Set(val *RelationshipNamespaces) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationshipNamespaces) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipNamespaces) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationshipNamespaces(val *RelationshipNamespaces) *NullableRelationshipNamespaces {
|
||||
return &NullableRelationshipNamespaces{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationshipNamespaces) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipNamespaces) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
150
internal/httpclient/model_relationship_patch.go
generated
Normal file
150
internal/httpclient/model_relationship_patch.go
generated
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// RelationshipPatch Payload for patching a relationship
|
||||
type RelationshipPatch struct {
|
||||
Action *string `json:"action,omitempty"`
|
||||
RelationTuple *Relationship `json:"relation_tuple,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationshipPatch instantiates a new RelationshipPatch object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRelationshipPatch() *RelationshipPatch {
|
||||
this := RelationshipPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationshipPatchWithDefaults instantiates a new RelationshipPatch object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRelationshipPatchWithDefaults() *RelationshipPatch {
|
||||
this := RelationshipPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAction returns the Action field value if set, zero value otherwise.
|
||||
func (o *RelationshipPatch) GetAction() string {
|
||||
if o == nil || o.Action == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Action
|
||||
}
|
||||
|
||||
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationshipPatch) GetActionOk() (*string, bool) {
|
||||
if o == nil || o.Action == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Action, true
|
||||
}
|
||||
|
||||
// HasAction returns a boolean if a field has been set.
|
||||
func (o *RelationshipPatch) HasAction() bool {
|
||||
if o != nil && o.Action != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetAction gets a reference to the given string and assigns it to the Action field.
|
||||
func (o *RelationshipPatch) SetAction(v string) {
|
||||
o.Action = &v
|
||||
}
|
||||
|
||||
// GetRelationTuple returns the RelationTuple field value if set, zero value otherwise.
|
||||
func (o *RelationshipPatch) GetRelationTuple() Relationship {
|
||||
if o == nil || o.RelationTuple == nil {
|
||||
var ret Relationship
|
||||
return ret
|
||||
}
|
||||
return *o.RelationTuple
|
||||
}
|
||||
|
||||
// GetRelationTupleOk returns a tuple with the RelationTuple field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *RelationshipPatch) GetRelationTupleOk() (*Relationship, bool) {
|
||||
if o == nil || o.RelationTuple == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.RelationTuple, true
|
||||
}
|
||||
|
||||
// HasRelationTuple returns a boolean if a field has been set.
|
||||
func (o *RelationshipPatch) HasRelationTuple() bool {
|
||||
if o != nil && o.RelationTuple != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelationTuple gets a reference to the given Relationship and assigns it to the RelationTuple field.
|
||||
func (o *RelationshipPatch) SetRelationTuple(v Relationship) {
|
||||
o.RelationTuple = &v
|
||||
}
|
||||
|
||||
func (o RelationshipPatch) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Action != nil {
|
||||
toSerialize["action"] = o.Action
|
||||
}
|
||||
if o.RelationTuple != nil {
|
||||
toSerialize["relation_tuple"] = o.RelationTuple
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationshipPatch struct {
|
||||
value *RelationshipPatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationshipPatch) Get() *RelationshipPatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipPatch) Set(val *RelationshipPatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationshipPatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipPatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationshipPatch(val *RelationshipPatch) *NullableRelationshipPatch {
|
||||
return &NullableRelationshipPatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationshipPatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationshipPatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
151
internal/httpclient/model_relationships.go
generated
Normal file
151
internal/httpclient/model_relationships.go
generated
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Relationships Paginated Relationship List
|
||||
type Relationships struct {
|
||||
// The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page.
|
||||
NextPageToken *string `json:"next_page_token,omitempty"`
|
||||
RelationTuples []Relationship `json:"relation_tuples,omitempty"`
|
||||
}
|
||||
|
||||
// NewRelationships instantiates a new Relationships object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewRelationships() *Relationships {
|
||||
this := Relationships{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRelationshipsWithDefaults instantiates a new Relationships object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewRelationshipsWithDefaults() *Relationships {
|
||||
this := Relationships{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNextPageToken returns the NextPageToken field value if set, zero value otherwise.
|
||||
func (o *Relationships) GetNextPageToken() string {
|
||||
if o == nil || o.NextPageToken == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.NextPageToken
|
||||
}
|
||||
|
||||
// GetNextPageTokenOk returns a tuple with the NextPageToken field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationships) GetNextPageTokenOk() (*string, bool) {
|
||||
if o == nil || o.NextPageToken == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.NextPageToken, true
|
||||
}
|
||||
|
||||
// HasNextPageToken returns a boolean if a field has been set.
|
||||
func (o *Relationships) HasNextPageToken() bool {
|
||||
if o != nil && o.NextPageToken != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetNextPageToken gets a reference to the given string and assigns it to the NextPageToken field.
|
||||
func (o *Relationships) SetNextPageToken(v string) {
|
||||
o.NextPageToken = &v
|
||||
}
|
||||
|
||||
// GetRelationTuples returns the RelationTuples field value if set, zero value otherwise.
|
||||
func (o *Relationships) GetRelationTuples() []Relationship {
|
||||
if o == nil || o.RelationTuples == nil {
|
||||
var ret []Relationship
|
||||
return ret
|
||||
}
|
||||
return o.RelationTuples
|
||||
}
|
||||
|
||||
// GetRelationTuplesOk returns a tuple with the RelationTuples field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Relationships) GetRelationTuplesOk() ([]Relationship, bool) {
|
||||
if o == nil || o.RelationTuples == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.RelationTuples, true
|
||||
}
|
||||
|
||||
// HasRelationTuples returns a boolean if a field has been set.
|
||||
func (o *Relationships) HasRelationTuples() bool {
|
||||
if o != nil && o.RelationTuples != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRelationTuples gets a reference to the given []Relationship and assigns it to the RelationTuples field.
|
||||
func (o *Relationships) SetRelationTuples(v []Relationship) {
|
||||
o.RelationTuples = v
|
||||
}
|
||||
|
||||
func (o Relationships) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.NextPageToken != nil {
|
||||
toSerialize["next_page_token"] = o.NextPageToken
|
||||
}
|
||||
if o.RelationTuples != nil {
|
||||
toSerialize["relation_tuples"] = o.RelationTuples
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRelationships struct {
|
||||
value *Relationships
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRelationships) Get() *Relationships {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRelationships) Set(val *Relationships) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRelationships) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRelationships) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRelationships(val *Relationships) *NullableRelationships {
|
||||
return &NullableRelationships{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRelationships) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRelationships) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
150
internal/httpclient/model_source_position.go
generated
Normal file
150
internal/httpclient/model_source_position.go
generated
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SourcePosition struct for SourcePosition
|
||||
type SourcePosition struct {
|
||||
Line *int64 `json:"Line,omitempty"`
|
||||
Column *int64 `json:"column,omitempty"`
|
||||
}
|
||||
|
||||
// NewSourcePosition instantiates a new SourcePosition object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSourcePosition() *SourcePosition {
|
||||
this := SourcePosition{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSourcePositionWithDefaults instantiates a new SourcePosition object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSourcePositionWithDefaults() *SourcePosition {
|
||||
this := SourcePosition{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLine returns the Line field value if set, zero value otherwise.
|
||||
func (o *SourcePosition) GetLine() int64 {
|
||||
if o == nil || o.Line == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Line
|
||||
}
|
||||
|
||||
// GetLineOk returns a tuple with the Line field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SourcePosition) GetLineOk() (*int64, bool) {
|
||||
if o == nil || o.Line == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Line, true
|
||||
}
|
||||
|
||||
// HasLine returns a boolean if a field has been set.
|
||||
func (o *SourcePosition) HasLine() bool {
|
||||
if o != nil && o.Line != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLine gets a reference to the given int64 and assigns it to the Line field.
|
||||
func (o *SourcePosition) SetLine(v int64) {
|
||||
o.Line = &v
|
||||
}
|
||||
|
||||
// GetColumn returns the Column field value if set, zero value otherwise.
|
||||
func (o *SourcePosition) GetColumn() int64 {
|
||||
if o == nil || o.Column == nil {
|
||||
var ret int64
|
||||
return ret
|
||||
}
|
||||
return *o.Column
|
||||
}
|
||||
|
||||
// GetColumnOk returns a tuple with the Column field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SourcePosition) GetColumnOk() (*int64, bool) {
|
||||
if o == nil || o.Column == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Column, true
|
||||
}
|
||||
|
||||
// HasColumn returns a boolean if a field has been set.
|
||||
func (o *SourcePosition) HasColumn() bool {
|
||||
if o != nil && o.Column != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetColumn gets a reference to the given int64 and assigns it to the Column field.
|
||||
func (o *SourcePosition) SetColumn(v int64) {
|
||||
o.Column = &v
|
||||
}
|
||||
|
||||
func (o SourcePosition) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Line != nil {
|
||||
toSerialize["Line"] = o.Line
|
||||
}
|
||||
if o.Column != nil {
|
||||
toSerialize["column"] = o.Column
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSourcePosition struct {
|
||||
value *SourcePosition
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSourcePosition) Get() *SourcePosition {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSourcePosition) Set(val *SourcePosition) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSourcePosition) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSourcePosition) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSourcePosition(val *SourcePosition) *NullableSourcePosition {
|
||||
return &NullableSourcePosition{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSourcePosition) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSourcePosition) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
168
internal/httpclient/model_subject_set.go
generated
Normal file
168
internal/httpclient/model_subject_set.go
generated
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// SubjectSet struct for SubjectSet
|
||||
type SubjectSet struct {
|
||||
// Namespace of the Subject Set
|
||||
Namespace string `json:"namespace"`
|
||||
// Object of the Subject Set
|
||||
Object string `json:"object"`
|
||||
// Relation of the Subject Set
|
||||
Relation string `json:"relation"`
|
||||
}
|
||||
|
||||
// NewSubjectSet instantiates a new SubjectSet object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewSubjectSet(namespace string, object string, relation string) *SubjectSet {
|
||||
this := SubjectSet{}
|
||||
this.Namespace = namespace
|
||||
this.Object = object
|
||||
this.Relation = relation
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewSubjectSetWithDefaults instantiates a new SubjectSet object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewSubjectSetWithDefaults() *SubjectSet {
|
||||
this := SubjectSet{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNamespace returns the Namespace field value
|
||||
func (o *SubjectSet) GetNamespace() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Namespace
|
||||
}
|
||||
|
||||
// GetNamespaceOk returns a tuple with the Namespace field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SubjectSet) GetNamespaceOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Namespace, true
|
||||
}
|
||||
|
||||
// SetNamespace sets field value
|
||||
func (o *SubjectSet) SetNamespace(v string) {
|
||||
o.Namespace = v
|
||||
}
|
||||
|
||||
// GetObject returns the Object field value
|
||||
func (o *SubjectSet) GetObject() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Object
|
||||
}
|
||||
|
||||
// GetObjectOk returns a tuple with the Object field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SubjectSet) GetObjectOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Object, true
|
||||
}
|
||||
|
||||
// SetObject sets field value
|
||||
func (o *SubjectSet) SetObject(v string) {
|
||||
o.Object = v
|
||||
}
|
||||
|
||||
// GetRelation returns the Relation field value
|
||||
func (o *SubjectSet) GetRelation() string {
|
||||
if o == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
|
||||
return o.Relation
|
||||
}
|
||||
|
||||
// GetRelationOk returns a tuple with the Relation field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *SubjectSet) GetRelationOk() (*string, bool) {
|
||||
if o == nil {
|
||||
return nil, false
|
||||
}
|
||||
return &o.Relation, true
|
||||
}
|
||||
|
||||
// SetRelation sets field value
|
||||
func (o *SubjectSet) SetRelation(v string) {
|
||||
o.Relation = v
|
||||
}
|
||||
|
||||
func (o SubjectSet) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if true {
|
||||
toSerialize["namespace"] = o.Namespace
|
||||
}
|
||||
if true {
|
||||
toSerialize["object"] = o.Object
|
||||
}
|
||||
if true {
|
||||
toSerialize["relation"] = o.Relation
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableSubjectSet struct {
|
||||
value *SubjectSet
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableSubjectSet) Get() *SubjectSet {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableSubjectSet) Set(val *SubjectSet) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableSubjectSet) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableSubjectSet) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableSubjectSet(val *SubjectSet) *NullableSubjectSet {
|
||||
return &NullableSubjectSet{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableSubjectSet) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableSubjectSet) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
internal/httpclient/model_version.go
generated
Normal file
115
internal/httpclient/model_version.go
generated
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Version struct for Version
|
||||
type Version struct {
|
||||
// Version is the service's version.
|
||||
Version *string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// NewVersion instantiates a new Version object
|
||||
// This constructor will assign default values to properties that have it defined,
|
||||
// and makes sure properties required by API are set, but the set of arguments
|
||||
// will change when the set of required properties is changed
|
||||
func NewVersion() *Version {
|
||||
this := Version{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewVersionWithDefaults instantiates a new Version object
|
||||
// This constructor will only assign default values to properties that have it defined,
|
||||
// but it doesn't guarantee that properties required by API are set
|
||||
func NewVersionWithDefaults() *Version {
|
||||
this := Version{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value if set, zero value otherwise.
|
||||
func (o *Version) GetVersion() string {
|
||||
if o == nil || o.Version == nil {
|
||||
var ret string
|
||||
return ret
|
||||
}
|
||||
return *o.Version
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Version) GetVersionOk() (*string, bool) {
|
||||
if o == nil || o.Version == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Version, true
|
||||
}
|
||||
|
||||
// HasVersion returns a boolean if a field has been set.
|
||||
func (o *Version) HasVersion() bool {
|
||||
if o != nil && o.Version != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
||||
func (o *Version) SetVersion(v string) {
|
||||
o.Version = &v
|
||||
}
|
||||
|
||||
func (o Version) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Version != nil {
|
||||
toSerialize["version"] = o.Version
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableVersion struct {
|
||||
value *Version
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableVersion) Get() *Version {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableVersion) Set(val *Version) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableVersion) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableVersion) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableVersion(val *Version) *NullableVersion {
|
||||
return &NullableVersion{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableVersion) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableVersion) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
48
internal/httpclient/response.go
generated
Normal file
48
internal/httpclient/response.go
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// APIResponse stores the API response returned by the server.
|
||||
type APIResponse struct {
|
||||
*http.Response `json:"-"`
|
||||
Message string `json:"message,omitempty"`
|
||||
// Operation is the name of the OpenAPI operation.
|
||||
Operation string `json:"operation,omitempty"`
|
||||
// RequestURL is the request URL. This value is always available, even if the
|
||||
// embedded *http.Response is nil.
|
||||
RequestURL string `json:"url,omitempty"`
|
||||
// Method is the HTTP method used for the request. This value is always
|
||||
// available, even if the embedded *http.Response is nil.
|
||||
Method string `json:"method,omitempty"`
|
||||
// Payload holds the contents of the response body (which may be nil or empty).
|
||||
// This is provided here as the raw response.Body() reader will have already
|
||||
// been drained.
|
||||
Payload []byte `json:"-"`
|
||||
}
|
||||
|
||||
// NewAPIResponse returns a new APIResonse object.
|
||||
func NewAPIResponse(r *http.Response) *APIResponse {
|
||||
|
||||
response := &APIResponse{Response: r}
|
||||
return response
|
||||
}
|
||||
|
||||
// NewAPIResponseWithError returns a new APIResponse object with the provided error message.
|
||||
func NewAPIResponseWithError(errorMessage string) *APIResponse {
|
||||
|
||||
response := &APIResponse{Message: errorMessage}
|
||||
return response
|
||||
}
|
||||
329
internal/httpclient/utils.go
generated
Normal file
329
internal/httpclient/utils.go
generated
Normal file
@@ -0,0 +1,329 @@
|
||||
/*
|
||||
* Ory Keto API
|
||||
*
|
||||
* Documentation for all of Ory Keto's REST APIs. gRPC is documented separately.
|
||||
*
|
||||
* API version:
|
||||
* Contact: hi@ory.sh
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// PtrBool is a helper routine that returns a pointer to given boolean value.
|
||||
func PtrBool(v bool) *bool { return &v }
|
||||
|
||||
// PtrInt is a helper routine that returns a pointer to given integer value.
|
||||
func PtrInt(v int) *int { return &v }
|
||||
|
||||
// PtrInt32 is a helper routine that returns a pointer to given integer value.
|
||||
func PtrInt32(v int32) *int32 { return &v }
|
||||
|
||||
// PtrInt64 is a helper routine that returns a pointer to given integer value.
|
||||
func PtrInt64(v int64) *int64 { return &v }
|
||||
|
||||
// PtrFloat32 is a helper routine that returns a pointer to given float value.
|
||||
func PtrFloat32(v float32) *float32 { return &v }
|
||||
|
||||
// PtrFloat64 is a helper routine that returns a pointer to given float value.
|
||||
func PtrFloat64(v float64) *float64 { return &v }
|
||||
|
||||
// PtrString is a helper routine that returns a pointer to given string value.
|
||||
func PtrString(v string) *string { return &v }
|
||||
|
||||
// PtrTime is helper routine that returns a pointer to given Time value.
|
||||
func PtrTime(v time.Time) *time.Time { return &v }
|
||||
|
||||
type NullableBool struct {
|
||||
value *bool
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBool) Get() *bool {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBool) Set(val *bool) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBool) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBool) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBool(val *bool) *NullableBool {
|
||||
return &NullableBool{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBool) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBool) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableInt struct {
|
||||
value *int
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInt) Get() *int {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInt) Set(val *int) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInt) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInt) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInt(val *int) *NullableInt {
|
||||
return &NullableInt{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInt) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInt) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableInt32 struct {
|
||||
value *int32
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInt32) Get() *int32 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInt32) Set(val *int32) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInt32) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInt32) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInt32(val *int32) *NullableInt32 {
|
||||
return &NullableInt32{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInt32) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInt32) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableInt64 struct {
|
||||
value *int64
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInt64) Get() *int64 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInt64) Set(val *int64) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInt64) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInt64) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInt64(val *int64) *NullableInt64 {
|
||||
return &NullableInt64{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInt64) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInt64) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableFloat32 struct {
|
||||
value *float32
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFloat32) Get() *float32 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFloat32) Set(val *float32) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFloat32) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFloat32) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFloat32(val *float32) *NullableFloat32 {
|
||||
return &NullableFloat32{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFloat32) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableFloat64 struct {
|
||||
value *float64
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFloat64) Get() *float64 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFloat64) Set(val *float64) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFloat64) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFloat64) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFloat64(val *float64) *NullableFloat64 {
|
||||
return &NullableFloat64{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFloat64) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableString struct {
|
||||
value *string
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableString) Get() *string {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableString) Set(val *string) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableString) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableString) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableString(val *string) *NullableString {
|
||||
return &NullableString{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableString) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableString) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
||||
type NullableTime struct {
|
||||
value *time.Time
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableTime) Get() *time.Time {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableTime) Set(val *time.Time) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableTime) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableTime) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableTime(val *time.Time) *NullableTime {
|
||||
return &NullableTime{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableTime) MarshalJSON() ([]byte, error) {
|
||||
return v.value.MarshalJSON()
|
||||
}
|
||||
|
||||
func (v *NullableTime) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Reference in New Issue
Block a user