colleges

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: GPL-3.0 Imports: 13 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 colleges API.

func (*Client) GetColleges

func (a *Client) GetColleges(params *GetCollegesParams, opts ...ClientOption) (*GetCollegesOK, error)

GetColleges gets colleges.

get all colleges or a college with specified name.

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetCollegesContext instead.

func (*Client) GetCollegesContext

func (a *Client) GetCollegesContext(ctx context.Context, params *GetCollegesParams, opts ...ClientOption) (*GetCollegesOK, error)

GetCollegesContext gets colleges.

get all colleges or a college with specified name.

Do not use the deprecated [GetCollegesParams.Context] with this method: it would be ignored.

func (*Client) GetCollegesID

func (a *Client) GetCollegesID(params *GetCollegesIDParams, opts ...ClientOption) (*GetCollegesIDOK, error)

GetCollegesID gets a college by ID.

get a single college by its ID.

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetCollegesIDContext instead.

func (*Client) GetCollegesIDContext

func (a *Client) GetCollegesIDContext(ctx context.Context, params *GetCollegesIDParams, opts ...ClientOption) (*GetCollegesIDOK, error)

GetCollegesIDContext gets a college by ID.

get a single college by its ID.

Do not use the deprecated [GetCollegesIDParams.Context] with this method: it would be ignored.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {

	// GetColleges get colleges.
	GetColleges(params *GetCollegesParams, opts ...ClientOption) (*GetCollegesOK, error)

	// GetCollegesContext get colleges.
	GetCollegesContext(ctx context.Context, params *GetCollegesParams, opts ...ClientOption) (*GetCollegesOK, error)

	// GetCollegesID get a college by ID.
	GetCollegesID(params *GetCollegesIDParams, opts ...ClientOption) (*GetCollegesIDOK, error)

	// GetCollegesIDContext get a college by ID.
	GetCollegesIDContext(ctx context.Context, params *GetCollegesIDParams, opts ...ClientOption) (*GetCollegesIDOK, error)

	SetTransport(transport runtime.ContextualTransport)
}

ClientService is the interface for Client methods.

func New

New creates a new colleges API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new colleges API client with basic auth credentials.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new colleges API client with a bearer token for authentication.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type GetCollegesIDBadRequest

type GetCollegesIDBadRequest struct {
	Payload *models.DtoErrorResponse
}

GetCollegesIDBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewGetCollegesIDBadRequest

func NewGetCollegesIDBadRequest() *GetCollegesIDBadRequest

NewGetCollegesIDBadRequest creates a GetCollegesIDBadRequest with default headers values

func (*GetCollegesIDBadRequest) Code

func (o *GetCollegesIDBadRequest) Code() int

Code gets the status code for the get colleges Id bad request response

func (*GetCollegesIDBadRequest) Error

func (o *GetCollegesIDBadRequest) Error() string

func (*GetCollegesIDBadRequest) GetPayload

func (*GetCollegesIDBadRequest) IsClientError

func (o *GetCollegesIDBadRequest) IsClientError() bool

IsClientError returns true when this get colleges Id bad request response has a 4xx status code

func (*GetCollegesIDBadRequest) IsCode

func (o *GetCollegesIDBadRequest) IsCode(code int) bool

IsCode returns true when this get colleges Id bad request response a status code equal to that given

func (*GetCollegesIDBadRequest) IsRedirect

func (o *GetCollegesIDBadRequest) IsRedirect() bool

IsRedirect returns true when this get colleges Id bad request response has a 3xx status code

func (*GetCollegesIDBadRequest) IsServerError

func (o *GetCollegesIDBadRequest) IsServerError() bool

IsServerError returns true when this get colleges Id bad request response has a 5xx status code

func (*GetCollegesIDBadRequest) IsSuccess

func (o *GetCollegesIDBadRequest) IsSuccess() bool

IsSuccess returns true when this get colleges Id bad request response has a 2xx status code

func (*GetCollegesIDBadRequest) String

func (o *GetCollegesIDBadRequest) String() string

type GetCollegesIDInternalServerError

type GetCollegesIDInternalServerError struct {
	Payload *models.DtoErrorResponse
}

GetCollegesIDInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewGetCollegesIDInternalServerError

func NewGetCollegesIDInternalServerError() *GetCollegesIDInternalServerError

NewGetCollegesIDInternalServerError creates a GetCollegesIDInternalServerError with default headers values

func (*GetCollegesIDInternalServerError) Code

Code gets the status code for the get colleges Id internal server error response

func (*GetCollegesIDInternalServerError) Error

func (*GetCollegesIDInternalServerError) GetPayload

func (*GetCollegesIDInternalServerError) IsClientError

func (o *GetCollegesIDInternalServerError) IsClientError() bool

IsClientError returns true when this get colleges Id internal server error response has a 4xx status code

func (*GetCollegesIDInternalServerError) IsCode

func (o *GetCollegesIDInternalServerError) IsCode(code int) bool

IsCode returns true when this get colleges Id internal server error response a status code equal to that given

func (*GetCollegesIDInternalServerError) IsRedirect

func (o *GetCollegesIDInternalServerError) IsRedirect() bool

IsRedirect returns true when this get colleges Id internal server error response has a 3xx status code

func (*GetCollegesIDInternalServerError) IsServerError

func (o *GetCollegesIDInternalServerError) IsServerError() bool

IsServerError returns true when this get colleges Id internal server error response has a 5xx status code

func (*GetCollegesIDInternalServerError) IsSuccess

func (o *GetCollegesIDInternalServerError) IsSuccess() bool

IsSuccess returns true when this get colleges Id internal server error response has a 2xx status code

func (*GetCollegesIDInternalServerError) String

type GetCollegesIDNotFound

type GetCollegesIDNotFound struct {
	Payload *models.DtoErrorResponse
}

GetCollegesIDNotFound describes a response with status code 404, with default header values.

Not Found

func NewGetCollegesIDNotFound

func NewGetCollegesIDNotFound() *GetCollegesIDNotFound

NewGetCollegesIDNotFound creates a GetCollegesIDNotFound with default headers values

func (*GetCollegesIDNotFound) Code

func (o *GetCollegesIDNotFound) Code() int

Code gets the status code for the get colleges Id not found response

func (*GetCollegesIDNotFound) Error

func (o *GetCollegesIDNotFound) Error() string

func (*GetCollegesIDNotFound) GetPayload

func (*GetCollegesIDNotFound) IsClientError

func (o *GetCollegesIDNotFound) IsClientError() bool

IsClientError returns true when this get colleges Id not found response has a 4xx status code

func (*GetCollegesIDNotFound) IsCode

func (o *GetCollegesIDNotFound) IsCode(code int) bool

IsCode returns true when this get colleges Id not found response a status code equal to that given

func (*GetCollegesIDNotFound) IsRedirect

func (o *GetCollegesIDNotFound) IsRedirect() bool

IsRedirect returns true when this get colleges Id not found response has a 3xx status code

func (*GetCollegesIDNotFound) IsServerError

func (o *GetCollegesIDNotFound) IsServerError() bool

IsServerError returns true when this get colleges Id not found response has a 5xx status code

func (*GetCollegesIDNotFound) IsSuccess

func (o *GetCollegesIDNotFound) IsSuccess() bool

IsSuccess returns true when this get colleges Id not found response has a 2xx status code

func (*GetCollegesIDNotFound) String

func (o *GetCollegesIDNotFound) String() string

type GetCollegesIDOK

type GetCollegesIDOK struct {
	Payload *models.DtoCollegeResponse
}

GetCollegesIDOK describes a response with status code 200, with default header values.

OK

func NewGetCollegesIDOK

func NewGetCollegesIDOK() *GetCollegesIDOK

NewGetCollegesIDOK creates a GetCollegesIDOK with default headers values

func (*GetCollegesIDOK) Code

func (o *GetCollegesIDOK) Code() int

Code gets the status code for the get colleges Id o k response

func (*GetCollegesIDOK) Error

func (o *GetCollegesIDOK) Error() string

func (*GetCollegesIDOK) GetPayload

func (o *GetCollegesIDOK) GetPayload() *models.DtoCollegeResponse

func (*GetCollegesIDOK) IsClientError

func (o *GetCollegesIDOK) IsClientError() bool

IsClientError returns true when this get colleges Id o k response has a 4xx status code

func (*GetCollegesIDOK) IsCode

func (o *GetCollegesIDOK) IsCode(code int) bool

IsCode returns true when this get colleges Id o k response a status code equal to that given

func (*GetCollegesIDOK) IsRedirect

func (o *GetCollegesIDOK) IsRedirect() bool

IsRedirect returns true when this get colleges Id o k response has a 3xx status code

func (*GetCollegesIDOK) IsServerError

func (o *GetCollegesIDOK) IsServerError() bool

IsServerError returns true when this get colleges Id o k response has a 5xx status code

func (*GetCollegesIDOK) IsSuccess

func (o *GetCollegesIDOK) IsSuccess() bool

IsSuccess returns true when this get colleges Id o k response has a 2xx status code

func (*GetCollegesIDOK) String

func (o *GetCollegesIDOK) String() string

type GetCollegesIDParams

type GetCollegesIDParams struct {

	// ID.
	//
	// College ID
	ID int64

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

GetCollegesIDParams contains all the parameters to send to the API endpoint

for the get colleges ID operation.

Typically these are written to a http.Request.

func NewGetCollegesIDParams

func NewGetCollegesIDParams() *GetCollegesIDParams

NewGetCollegesIDParams creates a new GetCollegesIDParams 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 NewGetCollegesIDParamsWithContext deprecated

func NewGetCollegesIDParamsWithContext(ctx context.Context) *GetCollegesIDParams

NewGetCollegesIDParamsWithContext creates a new GetCollegesIDParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetCollegesIDParams.

func NewGetCollegesIDParamsWithHTTPClient

func NewGetCollegesIDParamsWithHTTPClient(client *http.Client) *GetCollegesIDParams

NewGetCollegesIDParamsWithHTTPClient creates a new GetCollegesIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetCollegesIDParamsWithTimeout

func NewGetCollegesIDParamsWithTimeout(timeout time.Duration) *GetCollegesIDParams

NewGetCollegesIDParamsWithTimeout creates a new GetCollegesIDParams object with the ability to set a timeout on a request.

func (*GetCollegesIDParams) SetContext deprecated

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

SetContext adds the context to the get colleges ID params.

Deprecated: use the operation call with context to pass the context instead of GetCollegesIDParams.

func (*GetCollegesIDParams) SetDefaults

func (o *GetCollegesIDParams) SetDefaults()

SetDefaults hydrates default values in the get colleges ID params (not the query body).

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

func (*GetCollegesIDParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get colleges ID params.

func (*GetCollegesIDParams) SetID

func (o *GetCollegesIDParams) SetID(id int64)

SetID adds the id to the get colleges ID params.

func (*GetCollegesIDParams) SetTimeout

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

SetTimeout adds the timeout to the get colleges ID params.

func (*GetCollegesIDParams) WithContext deprecated

WithContext adds the context to the get colleges ID params.

Deprecated: use the operation call with context to pass the context instead of GetCollegesIDParams.

func (*GetCollegesIDParams) WithDefaults

func (o *GetCollegesIDParams) WithDefaults() *GetCollegesIDParams

WithDefaults hydrates default values in the get colleges ID params (not the query body).

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

func (*GetCollegesIDParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get colleges ID params.

func (*GetCollegesIDParams) WithID

WithID adds the id to the get colleges ID params.

func (*GetCollegesIDParams) WithTimeout

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

WithTimeout adds the timeout to the get colleges ID params.

func (*GetCollegesIDParams) WriteToRequest

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

WriteToRequest writes these params to a runtime.ClientRequest.

type GetCollegesIDReader

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

GetCollegesIDReader is a Reader for the GetCollegesID structure.

func (*GetCollegesIDReader) ReadResponse

func (o *GetCollegesIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

type GetCollegesInternalServerError

type GetCollegesInternalServerError struct {
	Payload *models.DtoErrorResponse
}

GetCollegesInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewGetCollegesInternalServerError

func NewGetCollegesInternalServerError() *GetCollegesInternalServerError

NewGetCollegesInternalServerError creates a GetCollegesInternalServerError with default headers values

func (*GetCollegesInternalServerError) Code

Code gets the status code for the get colleges internal server error response

func (*GetCollegesInternalServerError) Error

func (*GetCollegesInternalServerError) GetPayload

func (*GetCollegesInternalServerError) IsClientError

func (o *GetCollegesInternalServerError) IsClientError() bool

IsClientError returns true when this get colleges internal server error response has a 4xx status code

func (*GetCollegesInternalServerError) IsCode

func (o *GetCollegesInternalServerError) IsCode(code int) bool

IsCode returns true when this get colleges internal server error response a status code equal to that given

func (*GetCollegesInternalServerError) IsRedirect

func (o *GetCollegesInternalServerError) IsRedirect() bool

IsRedirect returns true when this get colleges internal server error response has a 3xx status code

func (*GetCollegesInternalServerError) IsServerError

func (o *GetCollegesInternalServerError) IsServerError() bool

IsServerError returns true when this get colleges internal server error response has a 5xx status code

func (*GetCollegesInternalServerError) IsSuccess

func (o *GetCollegesInternalServerError) IsSuccess() bool

IsSuccess returns true when this get colleges internal server error response has a 2xx status code

func (*GetCollegesInternalServerError) String

type GetCollegesOK

type GetCollegesOK struct {
	Payload []*models.DtoCollegeResponse
}

GetCollegesOK describes a response with status code 200, with default header values.

OK

func NewGetCollegesOK

func NewGetCollegesOK() *GetCollegesOK

NewGetCollegesOK creates a GetCollegesOK with default headers values

func (*GetCollegesOK) Code

func (o *GetCollegesOK) Code() int

Code gets the status code for the get colleges o k response

func (*GetCollegesOK) Error

func (o *GetCollegesOK) Error() string

func (*GetCollegesOK) GetPayload

func (o *GetCollegesOK) GetPayload() []*models.DtoCollegeResponse

func (*GetCollegesOK) IsClientError

func (o *GetCollegesOK) IsClientError() bool

IsClientError returns true when this get colleges o k response has a 4xx status code

func (*GetCollegesOK) IsCode

func (o *GetCollegesOK) IsCode(code int) bool

IsCode returns true when this get colleges o k response a status code equal to that given

func (*GetCollegesOK) IsRedirect

func (o *GetCollegesOK) IsRedirect() bool

IsRedirect returns true when this get colleges o k response has a 3xx status code

func (*GetCollegesOK) IsServerError

func (o *GetCollegesOK) IsServerError() bool

IsServerError returns true when this get colleges o k response has a 5xx status code

func (*GetCollegesOK) IsSuccess

func (o *GetCollegesOK) IsSuccess() bool

IsSuccess returns true when this get colleges o k response has a 2xx status code

func (*GetCollegesOK) String

func (o *GetCollegesOK) String() string

type GetCollegesParams

type GetCollegesParams struct {

	// Name.
	//
	// College name
	Name *string

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

GetCollegesParams contains all the parameters to send to the API endpoint

for the get colleges operation.

Typically these are written to a http.Request.

func NewGetCollegesParams

func NewGetCollegesParams() *GetCollegesParams

NewGetCollegesParams creates a new GetCollegesParams 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 NewGetCollegesParamsWithContext deprecated

func NewGetCollegesParamsWithContext(ctx context.Context) *GetCollegesParams

NewGetCollegesParamsWithContext creates a new GetCollegesParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetCollegesParams.

func NewGetCollegesParamsWithHTTPClient

func NewGetCollegesParamsWithHTTPClient(client *http.Client) *GetCollegesParams

NewGetCollegesParamsWithHTTPClient creates a new GetCollegesParams object with the ability to set a custom HTTPClient for a request.

func NewGetCollegesParamsWithTimeout

func NewGetCollegesParamsWithTimeout(timeout time.Duration) *GetCollegesParams

NewGetCollegesParamsWithTimeout creates a new GetCollegesParams object with the ability to set a timeout on a request.

func (*GetCollegesParams) SetContext deprecated

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

SetContext adds the context to the get colleges params.

Deprecated: use the operation call with context to pass the context instead of GetCollegesParams.

func (*GetCollegesParams) SetDefaults

func (o *GetCollegesParams) SetDefaults()

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

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

func (*GetCollegesParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get colleges params.

func (*GetCollegesParams) SetName

func (o *GetCollegesParams) SetName(name *string)

SetName adds the name to the get colleges params.

func (*GetCollegesParams) SetTimeout

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

SetTimeout adds the timeout to the get colleges params.

func (*GetCollegesParams) WithContext deprecated

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

WithContext adds the context to the get colleges params.

Deprecated: use the operation call with context to pass the context instead of GetCollegesParams.

func (*GetCollegesParams) WithDefaults

func (o *GetCollegesParams) WithDefaults() *GetCollegesParams

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

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

func (*GetCollegesParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get colleges params.

func (*GetCollegesParams) WithName

func (o *GetCollegesParams) WithName(name *string) *GetCollegesParams

WithName adds the name to the get colleges params.

func (*GetCollegesParams) WithTimeout

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

WithTimeout adds the timeout to the get colleges params.

func (*GetCollegesParams) WriteToRequest

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

WriteToRequest writes these params to a runtime.ClientRequest.

type GetCollegesReader

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

GetCollegesReader is a Reader for the GetColleges structure.

func (*GetCollegesReader) ReadResponse

func (o *GetCollegesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, 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