graph_service

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 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 graph service API

func (*Client) Relation

func (a *Client) Relation(params *RelationParams, opts ...ClientOption) (*RelationOK, error)

Relation computes relation of context user with another user

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) UserState

func (a *Client) UserState(params *UserStateParams, opts ...ClientOption) (*UserStateOK, error)

UserState computes accessible workspaces for a given user

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	Relation(params *RelationParams, opts ...ClientOption) (*RelationOK, error)

	UserState(params *UserStateParams, opts ...ClientOption) (*UserStateOK, 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 graph service API client.

type RelationForbidden

type RelationForbidden struct {
	Payload *models.RestError
}
RelationForbidden describes a response with status code 403, with default header values.

User has no permission to access this resource

func NewRelationForbidden

func NewRelationForbidden() *RelationForbidden

NewRelationForbidden creates a RelationForbidden with default headers values

func (*RelationForbidden) Error

func (o *RelationForbidden) Error() string

func (*RelationForbidden) GetPayload

func (o *RelationForbidden) GetPayload() *models.RestError

type RelationInternalServerError

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

An internal error occurred in the backend

func NewRelationInternalServerError

func NewRelationInternalServerError() *RelationInternalServerError

NewRelationInternalServerError creates a RelationInternalServerError with default headers values

func (*RelationInternalServerError) Error

func (*RelationInternalServerError) GetPayload

func (o *RelationInternalServerError) GetPayload() *models.RestError

type RelationNotFound

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

Resource does not exist in the system

func NewRelationNotFound

func NewRelationNotFound() *RelationNotFound

NewRelationNotFound creates a RelationNotFound with default headers values

func (*RelationNotFound) Error

func (o *RelationNotFound) Error() string

func (*RelationNotFound) GetPayload

func (o *RelationNotFound) GetPayload() *models.RestError

type RelationOK

type RelationOK struct {
	Payload *models.RestRelationResponse
}
RelationOK describes a response with status code 200, with default header values.

RelationOK relation o k

func NewRelationOK

func NewRelationOK() *RelationOK

NewRelationOK creates a RelationOK with default headers values

func (*RelationOK) Error

func (o *RelationOK) Error() string

func (*RelationOK) GetPayload

func (o *RelationOK) GetPayload() *models.RestRelationResponse

type RelationParams

type RelationParams struct {

	// UserID.
	UserID string

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

RelationParams contains all the parameters to send to the API endpoint

for the relation operation.

Typically these are written to a http.Request.

func NewRelationParams

func NewRelationParams() *RelationParams

NewRelationParams creates a new RelationParams 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 NewRelationParamsWithContext

func NewRelationParamsWithContext(ctx context.Context) *RelationParams

NewRelationParamsWithContext creates a new RelationParams object with the ability to set a context for a request.

func NewRelationParamsWithHTTPClient

func NewRelationParamsWithHTTPClient(client *http.Client) *RelationParams

NewRelationParamsWithHTTPClient creates a new RelationParams object with the ability to set a custom HTTPClient for a request.

func NewRelationParamsWithTimeout

func NewRelationParamsWithTimeout(timeout time.Duration) *RelationParams

NewRelationParamsWithTimeout creates a new RelationParams object with the ability to set a timeout on a request.

func (*RelationParams) SetContext

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

SetContext adds the context to the relation params

func (*RelationParams) SetDefaults

func (o *RelationParams) SetDefaults()

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

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

func (*RelationParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the relation params

func (*RelationParams) SetTimeout

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

SetTimeout adds the timeout to the relation params

func (*RelationParams) SetUserID

func (o *RelationParams) SetUserID(userID string)

SetUserID adds the userId to the relation params

func (*RelationParams) WithContext

func (o *RelationParams) WithContext(ctx context.Context) *RelationParams

WithContext adds the context to the relation params

func (*RelationParams) WithDefaults

func (o *RelationParams) WithDefaults() *RelationParams

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

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

func (*RelationParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the relation params

func (*RelationParams) WithTimeout

func (o *RelationParams) WithTimeout(timeout time.Duration) *RelationParams

WithTimeout adds the timeout to the relation params

func (*RelationParams) WithUserID

func (o *RelationParams) WithUserID(userID string) *RelationParams

WithUserID adds the userID to the relation params

func (*RelationParams) WriteToRequest

func (o *RelationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type RelationReader

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

RelationReader is a Reader for the Relation structure.

func (*RelationReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RelationUnauthorized

type RelationUnauthorized struct {
}
RelationUnauthorized describes a response with status code 401, with default header values.

User is not authenticated

func NewRelationUnauthorized

func NewRelationUnauthorized() *RelationUnauthorized

NewRelationUnauthorized creates a RelationUnauthorized with default headers values

func (*RelationUnauthorized) Error

func (o *RelationUnauthorized) Error() string

type UserStateForbidden

type UserStateForbidden struct {
	Payload *models.RestError
}
UserStateForbidden describes a response with status code 403, with default header values.

User has no permission to access this resource

func NewUserStateForbidden

func NewUserStateForbidden() *UserStateForbidden

NewUserStateForbidden creates a UserStateForbidden with default headers values

func (*UserStateForbidden) Error

func (o *UserStateForbidden) Error() string

func (*UserStateForbidden) GetPayload

func (o *UserStateForbidden) GetPayload() *models.RestError

type UserStateInternalServerError

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

An internal error occurred in the backend

func NewUserStateInternalServerError

func NewUserStateInternalServerError() *UserStateInternalServerError

NewUserStateInternalServerError creates a UserStateInternalServerError with default headers values

func (*UserStateInternalServerError) Error

func (*UserStateInternalServerError) GetPayload

type UserStateNotFound

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

Resource does not exist in the system

func NewUserStateNotFound

func NewUserStateNotFound() *UserStateNotFound

NewUserStateNotFound creates a UserStateNotFound with default headers values

func (*UserStateNotFound) Error

func (o *UserStateNotFound) Error() string

func (*UserStateNotFound) GetPayload

func (o *UserStateNotFound) GetPayload() *models.RestError

type UserStateOK

type UserStateOK struct {
	Payload *models.RestUserStateResponse
}
UserStateOK describes a response with status code 200, with default header values.

UserStateOK user state o k

func NewUserStateOK

func NewUserStateOK() *UserStateOK

NewUserStateOK creates a UserStateOK with default headers values

func (*UserStateOK) Error

func (o *UserStateOK) Error() string

func (*UserStateOK) GetPayload

func (o *UserStateOK) GetPayload() *models.RestUserStateResponse

type UserStateParams

type UserStateParams struct {

	// Segment.
	Segment string

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

UserStateParams contains all the parameters to send to the API endpoint

for the user state operation.

Typically these are written to a http.Request.

func NewUserStateParams

func NewUserStateParams() *UserStateParams

NewUserStateParams creates a new UserStateParams 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 NewUserStateParamsWithContext

func NewUserStateParamsWithContext(ctx context.Context) *UserStateParams

NewUserStateParamsWithContext creates a new UserStateParams object with the ability to set a context for a request.

func NewUserStateParamsWithHTTPClient

func NewUserStateParamsWithHTTPClient(client *http.Client) *UserStateParams

NewUserStateParamsWithHTTPClient creates a new UserStateParams object with the ability to set a custom HTTPClient for a request.

func NewUserStateParamsWithTimeout

func NewUserStateParamsWithTimeout(timeout time.Duration) *UserStateParams

NewUserStateParamsWithTimeout creates a new UserStateParams object with the ability to set a timeout on a request.

func (*UserStateParams) SetContext

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

SetContext adds the context to the user state params

func (*UserStateParams) SetDefaults

func (o *UserStateParams) SetDefaults()

SetDefaults hydrates default values in the user state params (not the query body).

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

func (*UserStateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the user state params

func (*UserStateParams) SetSegment

func (o *UserStateParams) SetSegment(segment string)

SetSegment adds the segment to the user state params

func (*UserStateParams) SetTimeout

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

SetTimeout adds the timeout to the user state params

func (*UserStateParams) WithContext

func (o *UserStateParams) WithContext(ctx context.Context) *UserStateParams

WithContext adds the context to the user state params

func (*UserStateParams) WithDefaults

func (o *UserStateParams) WithDefaults() *UserStateParams

WithDefaults hydrates default values in the user state params (not the query body).

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

func (*UserStateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the user state params

func (*UserStateParams) WithSegment

func (o *UserStateParams) WithSegment(segment string) *UserStateParams

WithSegment adds the segment to the user state params

func (*UserStateParams) WithTimeout

func (o *UserStateParams) WithTimeout(timeout time.Duration) *UserStateParams

WithTimeout adds the timeout to the user state params

func (*UserStateParams) WriteToRequest

func (o *UserStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type UserStateReader

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

UserStateReader is a Reader for the UserState structure.

func (*UserStateReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type UserStateUnauthorized

type UserStateUnauthorized struct {
}
UserStateUnauthorized describes a response with status code 401, with default header values.

User is not authenticated

func NewUserStateUnauthorized

func NewUserStateUnauthorized() *UserStateUnauthorized

NewUserStateUnauthorized creates a UserStateUnauthorized with default headers values

func (*UserStateUnauthorized) Error

func (o *UserStateUnauthorized) Error() string

Jump to

Keyboard shortcuts

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