write

package
v0.8.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for write API

func (*Client) CreateRelationTuple

func (a *Client) CreateRelationTuple(params *CreateRelationTupleParams, opts ...ClientOption) (*CreateRelationTupleCreated, error)

CreateRelationTuple creates a relation tuple

Use this endpoint to create a relation tuple.

func (*Client) DeleteRelationTuples

func (a *Client) DeleteRelationTuples(params *DeleteRelationTuplesParams, opts ...ClientOption) (*DeleteRelationTuplesNoContent, error)

DeleteRelationTuples deletes relation tuples

Use this endpoint to delete relation tuples

func (*Client) PatchRelationTuples

func (a *Client) PatchRelationTuples(params *PatchRelationTuplesParams, opts ...ClientOption) (*PatchRelationTuplesNoContent, error)

PatchRelationTuples patches multiple relation tuples

Use this endpoint to patch one or more relation tuples.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CreateRelationTuple(params *CreateRelationTupleParams, opts ...ClientOption) (*CreateRelationTupleCreated, error)

	DeleteRelationTuples(params *DeleteRelationTuplesParams, opts ...ClientOption) (*DeleteRelationTuplesNoContent, error)

	PatchRelationTuples(params *PatchRelationTuplesParams, opts ...ClientOption) (*PatchRelationTuplesNoContent, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new write API client.

type CreateRelationTupleBadRequest

type CreateRelationTupleBadRequest struct {
	Payload *models.GenericError
}
CreateRelationTupleBadRequest describes a response with status code 400, with default header values.

genericError

func NewCreateRelationTupleBadRequest

func NewCreateRelationTupleBadRequest() *CreateRelationTupleBadRequest

NewCreateRelationTupleBadRequest creates a CreateRelationTupleBadRequest with default headers values

func (*CreateRelationTupleBadRequest) Error

func (*CreateRelationTupleBadRequest) GetPayload

type CreateRelationTupleCreated

type CreateRelationTupleCreated struct {
	Payload *models.RelationQuery
}
CreateRelationTupleCreated describes a response with status code 201, with default header values.

RelationQuery

func NewCreateRelationTupleCreated

func NewCreateRelationTupleCreated() *CreateRelationTupleCreated

NewCreateRelationTupleCreated creates a CreateRelationTupleCreated with default headers values

func (*CreateRelationTupleCreated) Error

func (*CreateRelationTupleCreated) GetPayload

type CreateRelationTupleInternalServerError

type CreateRelationTupleInternalServerError struct {
	Payload *models.GenericError
}
CreateRelationTupleInternalServerError describes a response with status code 500, with default header values.

genericError

func NewCreateRelationTupleInternalServerError

func NewCreateRelationTupleInternalServerError() *CreateRelationTupleInternalServerError

NewCreateRelationTupleInternalServerError creates a CreateRelationTupleInternalServerError with default headers values

func (*CreateRelationTupleInternalServerError) Error

func (*CreateRelationTupleInternalServerError) GetPayload

type CreateRelationTupleParams

type CreateRelationTupleParams struct {

	// Payload.
	Payload *models.RelationQuery

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateRelationTupleParams contains all the parameters to send to the API endpoint

for the create relation tuple operation.

Typically these are written to a http.Request.

func NewCreateRelationTupleParams

func NewCreateRelationTupleParams() *CreateRelationTupleParams

NewCreateRelationTupleParams creates a new CreateRelationTupleParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCreateRelationTupleParamsWithContext

func NewCreateRelationTupleParamsWithContext(ctx context.Context) *CreateRelationTupleParams

NewCreateRelationTupleParamsWithContext creates a new CreateRelationTupleParams object with the ability to set a context for a request.

func NewCreateRelationTupleParamsWithHTTPClient

func NewCreateRelationTupleParamsWithHTTPClient(client *http.Client) *CreateRelationTupleParams

NewCreateRelationTupleParamsWithHTTPClient creates a new CreateRelationTupleParams object with the ability to set a custom HTTPClient for a request.

func NewCreateRelationTupleParamsWithTimeout

func NewCreateRelationTupleParamsWithTimeout(timeout time.Duration) *CreateRelationTupleParams

NewCreateRelationTupleParamsWithTimeout creates a new CreateRelationTupleParams object with the ability to set a timeout on a request.

func (*CreateRelationTupleParams) SetContext

func (o *CreateRelationTupleParams) SetContext(ctx context.Context)

SetContext adds the context to the create relation tuple params

func (*CreateRelationTupleParams) SetDefaults

func (o *CreateRelationTupleParams) SetDefaults()

SetDefaults hydrates default values in the create relation tuple params (not the query body).

All values with no default are reset to their zero value.

func (*CreateRelationTupleParams) SetHTTPClient

func (o *CreateRelationTupleParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create relation tuple params

func (*CreateRelationTupleParams) SetPayload

func (o *CreateRelationTupleParams) SetPayload(payload *models.RelationQuery)

SetPayload adds the payload to the create relation tuple params

func (*CreateRelationTupleParams) SetTimeout

func (o *CreateRelationTupleParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create relation tuple params

func (*CreateRelationTupleParams) WithContext

WithContext adds the context to the create relation tuple params

func (*CreateRelationTupleParams) WithDefaults

WithDefaults hydrates default values in the create relation tuple params (not the query body).

All values with no default are reset to their zero value.

func (*CreateRelationTupleParams) WithHTTPClient

func (o *CreateRelationTupleParams) WithHTTPClient(client *http.Client) *CreateRelationTupleParams

WithHTTPClient adds the HTTPClient to the create relation tuple params

func (*CreateRelationTupleParams) WithPayload

WithPayload adds the payload to the create relation tuple params

func (*CreateRelationTupleParams) WithTimeout

WithTimeout adds the timeout to the create relation tuple params

func (*CreateRelationTupleParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type CreateRelationTupleReader

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

CreateRelationTupleReader is a Reader for the CreateRelationTuple structure.

func (*CreateRelationTupleReader) ReadResponse

func (o *CreateRelationTupleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type DeleteRelationTuplesBadRequest

type DeleteRelationTuplesBadRequest struct {
	Payload *models.GenericError
}
DeleteRelationTuplesBadRequest describes a response with status code 400, with default header values.

genericError

func NewDeleteRelationTuplesBadRequest

func NewDeleteRelationTuplesBadRequest() *DeleteRelationTuplesBadRequest

NewDeleteRelationTuplesBadRequest creates a DeleteRelationTuplesBadRequest with default headers values

func (*DeleteRelationTuplesBadRequest) Error

func (*DeleteRelationTuplesBadRequest) GetPayload

type DeleteRelationTuplesInternalServerError

type DeleteRelationTuplesInternalServerError struct {
	Payload *models.GenericError
}
DeleteRelationTuplesInternalServerError describes a response with status code 500, with default header values.

genericError

func NewDeleteRelationTuplesInternalServerError

func NewDeleteRelationTuplesInternalServerError() *DeleteRelationTuplesInternalServerError

NewDeleteRelationTuplesInternalServerError creates a DeleteRelationTuplesInternalServerError with default headers values

func (*DeleteRelationTuplesInternalServerError) Error

func (*DeleteRelationTuplesInternalServerError) GetPayload

type DeleteRelationTuplesNoContent

type DeleteRelationTuplesNoContent struct {
}
DeleteRelationTuplesNoContent describes a response with status code 204, with default header values.

Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.

func NewDeleteRelationTuplesNoContent

func NewDeleteRelationTuplesNoContent() *DeleteRelationTuplesNoContent

NewDeleteRelationTuplesNoContent creates a DeleteRelationTuplesNoContent with default headers values

func (*DeleteRelationTuplesNoContent) Error

type DeleteRelationTuplesParams

type DeleteRelationTuplesParams struct {

	/* Namespace.

	   Namespace of the Relation Tuple
	*/
	Namespace *string

	/* Object.

	   Object of the Relation Tuple
	*/
	Object *string

	/* Relation.

	   Relation of the Relation Tuple
	*/
	Relation *string

	/* SubjectID.

	   SubjectID of the Relation Tuple
	*/
	SubjectID *string

	/* SubjectSetNamespace.

	   Namespace of the Subject Set
	*/
	SubjectSetNamespace *string

	/* SubjectSetObject.

	   Object of the Subject Set
	*/
	SubjectSetObject *string

	/* SubjectSetRelation.

	   Relation of the Subject Set
	*/
	SubjectSetRelation *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

DeleteRelationTuplesParams contains all the parameters to send to the API endpoint

for the delete relation tuples operation.

Typically these are written to a http.Request.

func NewDeleteRelationTuplesParams

func NewDeleteRelationTuplesParams() *DeleteRelationTuplesParams

NewDeleteRelationTuplesParams creates a new DeleteRelationTuplesParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewDeleteRelationTuplesParamsWithContext

func NewDeleteRelationTuplesParamsWithContext(ctx context.Context) *DeleteRelationTuplesParams

NewDeleteRelationTuplesParamsWithContext creates a new DeleteRelationTuplesParams object with the ability to set a context for a request.

func NewDeleteRelationTuplesParamsWithHTTPClient

func NewDeleteRelationTuplesParamsWithHTTPClient(client *http.Client) *DeleteRelationTuplesParams

NewDeleteRelationTuplesParamsWithHTTPClient creates a new DeleteRelationTuplesParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteRelationTuplesParamsWithTimeout

func NewDeleteRelationTuplesParamsWithTimeout(timeout time.Duration) *DeleteRelationTuplesParams

NewDeleteRelationTuplesParamsWithTimeout creates a new DeleteRelationTuplesParams object with the ability to set a timeout on a request.

func (*DeleteRelationTuplesParams) SetContext

func (o *DeleteRelationTuplesParams) SetContext(ctx context.Context)

SetContext adds the context to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetDefaults

func (o *DeleteRelationTuplesParams) SetDefaults()

SetDefaults hydrates default values in the delete relation tuples params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteRelationTuplesParams) SetHTTPClient

func (o *DeleteRelationTuplesParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetNamespace

func (o *DeleteRelationTuplesParams) SetNamespace(namespace *string)

SetNamespace adds the namespace to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetObject

func (o *DeleteRelationTuplesParams) SetObject(object *string)

SetObject adds the object to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetRelation

func (o *DeleteRelationTuplesParams) SetRelation(relation *string)

SetRelation adds the relation to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetSubjectID

func (o *DeleteRelationTuplesParams) SetSubjectID(subjectID *string)

SetSubjectID adds the subjectId to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetSubjectSetNamespace

func (o *DeleteRelationTuplesParams) SetSubjectSetNamespace(subjectSetNamespace *string)

SetSubjectSetNamespace adds the subjectSetNamespace to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetSubjectSetObject

func (o *DeleteRelationTuplesParams) SetSubjectSetObject(subjectSetObject *string)

SetSubjectSetObject adds the subjectSetObject to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetSubjectSetRelation

func (o *DeleteRelationTuplesParams) SetSubjectSetRelation(subjectSetRelation *string)

SetSubjectSetRelation adds the subjectSetRelation to the delete relation tuples params

func (*DeleteRelationTuplesParams) SetTimeout

func (o *DeleteRelationTuplesParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithContext

WithContext adds the context to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithDefaults

WithDefaults hydrates default values in the delete relation tuples params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteRelationTuplesParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithNamespace

func (o *DeleteRelationTuplesParams) WithNamespace(namespace *string) *DeleteRelationTuplesParams

WithNamespace adds the namespace to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithObject

WithObject adds the object to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithRelation

func (o *DeleteRelationTuplesParams) WithRelation(relation *string) *DeleteRelationTuplesParams

WithRelation adds the relation to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithSubjectID

func (o *DeleteRelationTuplesParams) WithSubjectID(subjectID *string) *DeleteRelationTuplesParams

WithSubjectID adds the subjectID to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithSubjectSetNamespace

func (o *DeleteRelationTuplesParams) WithSubjectSetNamespace(subjectSetNamespace *string) *DeleteRelationTuplesParams

WithSubjectSetNamespace adds the subjectSetNamespace to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithSubjectSetObject

func (o *DeleteRelationTuplesParams) WithSubjectSetObject(subjectSetObject *string) *DeleteRelationTuplesParams

WithSubjectSetObject adds the subjectSetObject to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithSubjectSetRelation

func (o *DeleteRelationTuplesParams) WithSubjectSetRelation(subjectSetRelation *string) *DeleteRelationTuplesParams

WithSubjectSetRelation adds the subjectSetRelation to the delete relation tuples params

func (*DeleteRelationTuplesParams) WithTimeout

WithTimeout adds the timeout to the delete relation tuples params

func (*DeleteRelationTuplesParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type DeleteRelationTuplesReader

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

DeleteRelationTuplesReader is a Reader for the DeleteRelationTuples structure.

func (*DeleteRelationTuplesReader) ReadResponse

func (o *DeleteRelationTuplesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type PatchRelationTuplesBadRequest

type PatchRelationTuplesBadRequest struct {
	Payload *models.GenericError
}
PatchRelationTuplesBadRequest describes a response with status code 400, with default header values.

genericError

func NewPatchRelationTuplesBadRequest

func NewPatchRelationTuplesBadRequest() *PatchRelationTuplesBadRequest

NewPatchRelationTuplesBadRequest creates a PatchRelationTuplesBadRequest with default headers values

func (*PatchRelationTuplesBadRequest) Error

func (*PatchRelationTuplesBadRequest) GetPayload

type PatchRelationTuplesInternalServerError

type PatchRelationTuplesInternalServerError struct {
	Payload *models.GenericError
}
PatchRelationTuplesInternalServerError describes a response with status code 500, with default header values.

genericError

func NewPatchRelationTuplesInternalServerError

func NewPatchRelationTuplesInternalServerError() *PatchRelationTuplesInternalServerError

NewPatchRelationTuplesInternalServerError creates a PatchRelationTuplesInternalServerError with default headers values

func (*PatchRelationTuplesInternalServerError) Error

func (*PatchRelationTuplesInternalServerError) GetPayload

type PatchRelationTuplesNoContent

type PatchRelationTuplesNoContent struct {
}
PatchRelationTuplesNoContent describes a response with status code 204, with default header values.

Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201.

func NewPatchRelationTuplesNoContent

func NewPatchRelationTuplesNoContent() *PatchRelationTuplesNoContent

NewPatchRelationTuplesNoContent creates a PatchRelationTuplesNoContent with default headers values

func (*PatchRelationTuplesNoContent) Error

type PatchRelationTuplesNotFound

type PatchRelationTuplesNotFound struct {
	Payload *models.GenericError
}
PatchRelationTuplesNotFound describes a response with status code 404, with default header values.

genericError

func NewPatchRelationTuplesNotFound

func NewPatchRelationTuplesNotFound() *PatchRelationTuplesNotFound

NewPatchRelationTuplesNotFound creates a PatchRelationTuplesNotFound with default headers values

func (*PatchRelationTuplesNotFound) Error

func (*PatchRelationTuplesNotFound) GetPayload

type PatchRelationTuplesParams

type PatchRelationTuplesParams struct {

	// Payload.
	Payload []*models.PatchDelta

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PatchRelationTuplesParams contains all the parameters to send to the API endpoint

for the patch relation tuples operation.

Typically these are written to a http.Request.

func NewPatchRelationTuplesParams

func NewPatchRelationTuplesParams() *PatchRelationTuplesParams

NewPatchRelationTuplesParams creates a new PatchRelationTuplesParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewPatchRelationTuplesParamsWithContext

func NewPatchRelationTuplesParamsWithContext(ctx context.Context) *PatchRelationTuplesParams

NewPatchRelationTuplesParamsWithContext creates a new PatchRelationTuplesParams object with the ability to set a context for a request.

func NewPatchRelationTuplesParamsWithHTTPClient

func NewPatchRelationTuplesParamsWithHTTPClient(client *http.Client) *PatchRelationTuplesParams

NewPatchRelationTuplesParamsWithHTTPClient creates a new PatchRelationTuplesParams object with the ability to set a custom HTTPClient for a request.

func NewPatchRelationTuplesParamsWithTimeout

func NewPatchRelationTuplesParamsWithTimeout(timeout time.Duration) *PatchRelationTuplesParams

NewPatchRelationTuplesParamsWithTimeout creates a new PatchRelationTuplesParams object with the ability to set a timeout on a request.

func (*PatchRelationTuplesParams) SetContext

func (o *PatchRelationTuplesParams) SetContext(ctx context.Context)

SetContext adds the context to the patch relation tuples params

func (*PatchRelationTuplesParams) SetDefaults

func (o *PatchRelationTuplesParams) SetDefaults()

SetDefaults hydrates default values in the patch relation tuples params (not the query body).

All values with no default are reset to their zero value.

func (*PatchRelationTuplesParams) SetHTTPClient

func (o *PatchRelationTuplesParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the patch relation tuples params

func (*PatchRelationTuplesParams) SetPayload

func (o *PatchRelationTuplesParams) SetPayload(payload []*models.PatchDelta)

SetPayload adds the payload to the patch relation tuples params

func (*PatchRelationTuplesParams) SetTimeout

func (o *PatchRelationTuplesParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the patch relation tuples params

func (*PatchRelationTuplesParams) WithContext

WithContext adds the context to the patch relation tuples params

func (*PatchRelationTuplesParams) WithDefaults

WithDefaults hydrates default values in the patch relation tuples params (not the query body).

All values with no default are reset to their zero value.

func (*PatchRelationTuplesParams) WithHTTPClient

func (o *PatchRelationTuplesParams) WithHTTPClient(client *http.Client) *PatchRelationTuplesParams

WithHTTPClient adds the HTTPClient to the patch relation tuples params

func (*PatchRelationTuplesParams) WithPayload

WithPayload adds the payload to the patch relation tuples params

func (*PatchRelationTuplesParams) WithTimeout

WithTimeout adds the timeout to the patch relation tuples params

func (*PatchRelationTuplesParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type PatchRelationTuplesReader

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

PatchRelationTuplesReader is a Reader for the PatchRelationTuples structure.

func (*PatchRelationTuplesReader) ReadResponse

func (o *PatchRelationTuplesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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