subscription

package
v0.0.0-...-4c5e68c Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithContentTypeApplicationJSON

func WithContentTypeApplicationJSON(r *runtime.ClientOperation)

WithContentTypeApplicationJSON sets the Content-Type header to "application/json".

func WithContentTypeApplicationxWwwFormUrlencoded

func WithContentTypeApplicationxWwwFormUrlencoded(r *runtime.ClientOperation)

WithContentTypeApplicationxWwwFormUrlencoded sets the Content-Type header to "application/x-www-form-urlencoded".

Types

type Client

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

Client for subscription API

func (*Client) ConfirmSubscription

func (a *Client) ConfirmSubscription(params *ConfirmSubscriptionParams, opts ...ClientOption) (*ConfirmSubscriptionOK, error)

ConfirmSubscription confirms email subscription

Confirms a subscription using the token sent in the confirmation email.

func (*Client) GetSubscriptions

func (a *Client) GetSubscriptions(params *GetSubscriptionsParams, opts ...ClientOption) (*GetSubscriptionsOK, error)

GetSubscriptions gets subscriptions for an email

Returns all active subscriptions for the given email address.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) Subscribe

func (a *Client) Subscribe(params *SubscribeParams, opts ...ClientOption) (*SubscribeOK, error)

Subscribe subscribes to release notifications

Subscribe an email to receive notifications about new releases of a GitHub repository. The repository is validated via GitHub API.

func (*Client) Unsubscribe

func (a *Client) Unsubscribe(params *UnsubscribeParams, opts ...ClientOption) (*UnsubscribeOK, error)

Unsubscribe unsubscribes from release notifications

Unsubscribes an email from release notifications using the token sent in emails.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

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

func WithContentType

func WithContentType(mime string) ClientOption

WithContentType allows the client to force the Content-Type header to negotiate a specific Consumer from the server.

You may use this option to set arbitrary extensions to your MIME media type.

type ClientService

type ClientService interface {
	ConfirmSubscription(params *ConfirmSubscriptionParams, opts ...ClientOption) (*ConfirmSubscriptionOK, error)

	GetSubscriptions(params *GetSubscriptionsParams, opts ...ClientOption) (*GetSubscriptionsOK, error)

	Subscribe(params *SubscribeParams, opts ...ClientOption) (*SubscribeOK, error)

	Unsubscribe(params *UnsubscribeParams, opts ...ClientOption) (*UnsubscribeOK, 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 subscription API client.

func NewClientWithBasicAuth

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

New creates a new subscription 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 subscription 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 ConfirmSubscriptionBadRequest

type ConfirmSubscriptionBadRequest struct {
}

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

Invalid token

func NewConfirmSubscriptionBadRequest

func NewConfirmSubscriptionBadRequest() *ConfirmSubscriptionBadRequest

NewConfirmSubscriptionBadRequest creates a ConfirmSubscriptionBadRequest with default headers values

func (*ConfirmSubscriptionBadRequest) Code

Code gets the status code for the confirm subscription bad request response

func (*ConfirmSubscriptionBadRequest) Error

func (*ConfirmSubscriptionBadRequest) IsClientError

func (o *ConfirmSubscriptionBadRequest) IsClientError() bool

IsClientError returns true when this confirm subscription bad request response has a 4xx status code

func (*ConfirmSubscriptionBadRequest) IsCode

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

IsCode returns true when this confirm subscription bad request response a status code equal to that given

func (*ConfirmSubscriptionBadRequest) IsRedirect

func (o *ConfirmSubscriptionBadRequest) IsRedirect() bool

IsRedirect returns true when this confirm subscription bad request response has a 3xx status code

func (*ConfirmSubscriptionBadRequest) IsServerError

func (o *ConfirmSubscriptionBadRequest) IsServerError() bool

IsServerError returns true when this confirm subscription bad request response has a 5xx status code

func (*ConfirmSubscriptionBadRequest) IsSuccess

func (o *ConfirmSubscriptionBadRequest) IsSuccess() bool

IsSuccess returns true when this confirm subscription bad request response has a 2xx status code

func (*ConfirmSubscriptionBadRequest) String

type ConfirmSubscriptionNotFound

type ConfirmSubscriptionNotFound struct {
}

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

Token not found

func NewConfirmSubscriptionNotFound

func NewConfirmSubscriptionNotFound() *ConfirmSubscriptionNotFound

NewConfirmSubscriptionNotFound creates a ConfirmSubscriptionNotFound with default headers values

func (*ConfirmSubscriptionNotFound) Code

func (o *ConfirmSubscriptionNotFound) Code() int

Code gets the status code for the confirm subscription not found response

func (*ConfirmSubscriptionNotFound) Error

func (*ConfirmSubscriptionNotFound) IsClientError

func (o *ConfirmSubscriptionNotFound) IsClientError() bool

IsClientError returns true when this confirm subscription not found response has a 4xx status code

func (*ConfirmSubscriptionNotFound) IsCode

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

IsCode returns true when this confirm subscription not found response a status code equal to that given

func (*ConfirmSubscriptionNotFound) IsRedirect

func (o *ConfirmSubscriptionNotFound) IsRedirect() bool

IsRedirect returns true when this confirm subscription not found response has a 3xx status code

func (*ConfirmSubscriptionNotFound) IsServerError

func (o *ConfirmSubscriptionNotFound) IsServerError() bool

IsServerError returns true when this confirm subscription not found response has a 5xx status code

func (*ConfirmSubscriptionNotFound) IsSuccess

func (o *ConfirmSubscriptionNotFound) IsSuccess() bool

IsSuccess returns true when this confirm subscription not found response has a 2xx status code

func (*ConfirmSubscriptionNotFound) String

func (o *ConfirmSubscriptionNotFound) String() string

type ConfirmSubscriptionOK

type ConfirmSubscriptionOK struct {
}

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

Subscription confirmed successfully

func NewConfirmSubscriptionOK

func NewConfirmSubscriptionOK() *ConfirmSubscriptionOK

NewConfirmSubscriptionOK creates a ConfirmSubscriptionOK with default headers values

func (*ConfirmSubscriptionOK) Code

func (o *ConfirmSubscriptionOK) Code() int

Code gets the status code for the confirm subscription o k response

func (*ConfirmSubscriptionOK) Error

func (o *ConfirmSubscriptionOK) Error() string

func (*ConfirmSubscriptionOK) IsClientError

func (o *ConfirmSubscriptionOK) IsClientError() bool

IsClientError returns true when this confirm subscription o k response has a 4xx status code

func (*ConfirmSubscriptionOK) IsCode

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

IsCode returns true when this confirm subscription o k response a status code equal to that given

func (*ConfirmSubscriptionOK) IsRedirect

func (o *ConfirmSubscriptionOK) IsRedirect() bool

IsRedirect returns true when this confirm subscription o k response has a 3xx status code

func (*ConfirmSubscriptionOK) IsServerError

func (o *ConfirmSubscriptionOK) IsServerError() bool

IsServerError returns true when this confirm subscription o k response has a 5xx status code

func (*ConfirmSubscriptionOK) IsSuccess

func (o *ConfirmSubscriptionOK) IsSuccess() bool

IsSuccess returns true when this confirm subscription o k response has a 2xx status code

func (*ConfirmSubscriptionOK) String

func (o *ConfirmSubscriptionOK) String() string

type ConfirmSubscriptionParams

type ConfirmSubscriptionParams struct {

	/* Token.

	   Confirmation token
	*/
	Token string

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

ConfirmSubscriptionParams contains all the parameters to send to the API endpoint

for the confirm subscription operation.

Typically these are written to a http.Request.

func NewConfirmSubscriptionParams

func NewConfirmSubscriptionParams() *ConfirmSubscriptionParams

NewConfirmSubscriptionParams creates a new ConfirmSubscriptionParams 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 NewConfirmSubscriptionParamsWithContext

func NewConfirmSubscriptionParamsWithContext(ctx context.Context) *ConfirmSubscriptionParams

NewConfirmSubscriptionParamsWithContext creates a new ConfirmSubscriptionParams object with the ability to set a context for a request.

func NewConfirmSubscriptionParamsWithHTTPClient

func NewConfirmSubscriptionParamsWithHTTPClient(client *http.Client) *ConfirmSubscriptionParams

NewConfirmSubscriptionParamsWithHTTPClient creates a new ConfirmSubscriptionParams object with the ability to set a custom HTTPClient for a request.

func NewConfirmSubscriptionParamsWithTimeout

func NewConfirmSubscriptionParamsWithTimeout(timeout time.Duration) *ConfirmSubscriptionParams

NewConfirmSubscriptionParamsWithTimeout creates a new ConfirmSubscriptionParams object with the ability to set a timeout on a request.

func (*ConfirmSubscriptionParams) SetContext

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

SetContext adds the context to the confirm subscription params

func (*ConfirmSubscriptionParams) SetDefaults

func (o *ConfirmSubscriptionParams) SetDefaults()

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

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

func (*ConfirmSubscriptionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the confirm subscription params

func (*ConfirmSubscriptionParams) SetTimeout

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

SetTimeout adds the timeout to the confirm subscription params

func (*ConfirmSubscriptionParams) SetToken

func (o *ConfirmSubscriptionParams) SetToken(token string)

SetToken adds the token to the confirm subscription params

func (*ConfirmSubscriptionParams) WithContext

WithContext adds the context to the confirm subscription params

func (*ConfirmSubscriptionParams) WithDefaults

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

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

func (*ConfirmSubscriptionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the confirm subscription params

func (*ConfirmSubscriptionParams) WithTimeout

WithTimeout adds the timeout to the confirm subscription params

func (*ConfirmSubscriptionParams) WithToken

WithToken adds the token to the confirm subscription params

func (*ConfirmSubscriptionParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type ConfirmSubscriptionReader

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

ConfirmSubscriptionReader is a Reader for the ConfirmSubscription structure.

func (*ConfirmSubscriptionReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetSubscriptionsBadRequest

type GetSubscriptionsBadRequest struct {
}

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

Invalid email

func NewGetSubscriptionsBadRequest

func NewGetSubscriptionsBadRequest() *GetSubscriptionsBadRequest

NewGetSubscriptionsBadRequest creates a GetSubscriptionsBadRequest with default headers values

func (*GetSubscriptionsBadRequest) Code

func (o *GetSubscriptionsBadRequest) Code() int

Code gets the status code for the get subscriptions bad request response

func (*GetSubscriptionsBadRequest) Error

func (*GetSubscriptionsBadRequest) IsClientError

func (o *GetSubscriptionsBadRequest) IsClientError() bool

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

func (*GetSubscriptionsBadRequest) IsCode

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

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

func (*GetSubscriptionsBadRequest) IsRedirect

func (o *GetSubscriptionsBadRequest) IsRedirect() bool

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

func (*GetSubscriptionsBadRequest) IsServerError

func (o *GetSubscriptionsBadRequest) IsServerError() bool

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

func (*GetSubscriptionsBadRequest) IsSuccess

func (o *GetSubscriptionsBadRequest) IsSuccess() bool

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

func (*GetSubscriptionsBadRequest) String

func (o *GetSubscriptionsBadRequest) String() string

type GetSubscriptionsOK

type GetSubscriptionsOK struct {
	Payload []*models.Subscription
}

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

Successful operation - list of subscriptions returned

func NewGetSubscriptionsOK

func NewGetSubscriptionsOK() *GetSubscriptionsOK

NewGetSubscriptionsOK creates a GetSubscriptionsOK with default headers values

func (*GetSubscriptionsOK) Code

func (o *GetSubscriptionsOK) Code() int

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

func (*GetSubscriptionsOK) Error

func (o *GetSubscriptionsOK) Error() string

func (*GetSubscriptionsOK) GetPayload

func (o *GetSubscriptionsOK) GetPayload() []*models.Subscription

func (*GetSubscriptionsOK) IsClientError

func (o *GetSubscriptionsOK) IsClientError() bool

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

func (*GetSubscriptionsOK) IsCode

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

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

func (*GetSubscriptionsOK) IsRedirect

func (o *GetSubscriptionsOK) IsRedirect() bool

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

func (*GetSubscriptionsOK) IsServerError

func (o *GetSubscriptionsOK) IsServerError() bool

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

func (*GetSubscriptionsOK) IsSuccess

func (o *GetSubscriptionsOK) IsSuccess() bool

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

func (*GetSubscriptionsOK) String

func (o *GetSubscriptionsOK) String() string

type GetSubscriptionsParams

type GetSubscriptionsParams struct {

	/* Email.

	   Email address to look up subscriptions for
	*/
	Email string

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

GetSubscriptionsParams contains all the parameters to send to the API endpoint

for the get subscriptions operation.

Typically these are written to a http.Request.

func NewGetSubscriptionsParams

func NewGetSubscriptionsParams() *GetSubscriptionsParams

NewGetSubscriptionsParams creates a new GetSubscriptionsParams 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 NewGetSubscriptionsParamsWithContext

func NewGetSubscriptionsParamsWithContext(ctx context.Context) *GetSubscriptionsParams

NewGetSubscriptionsParamsWithContext creates a new GetSubscriptionsParams object with the ability to set a context for a request.

func NewGetSubscriptionsParamsWithHTTPClient

func NewGetSubscriptionsParamsWithHTTPClient(client *http.Client) *GetSubscriptionsParams

NewGetSubscriptionsParamsWithHTTPClient creates a new GetSubscriptionsParams object with the ability to set a custom HTTPClient for a request.

func NewGetSubscriptionsParamsWithTimeout

func NewGetSubscriptionsParamsWithTimeout(timeout time.Duration) *GetSubscriptionsParams

NewGetSubscriptionsParamsWithTimeout creates a new GetSubscriptionsParams object with the ability to set a timeout on a request.

func (*GetSubscriptionsParams) SetContext

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

SetContext adds the context to the get subscriptions params

func (*GetSubscriptionsParams) SetDefaults

func (o *GetSubscriptionsParams) SetDefaults()

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

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

func (*GetSubscriptionsParams) SetEmail

func (o *GetSubscriptionsParams) SetEmail(email string)

SetEmail adds the email to the get subscriptions params

func (*GetSubscriptionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get subscriptions params

func (*GetSubscriptionsParams) SetTimeout

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

SetTimeout adds the timeout to the get subscriptions params

func (*GetSubscriptionsParams) WithContext

WithContext adds the context to the get subscriptions params

func (*GetSubscriptionsParams) WithDefaults

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

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

func (*GetSubscriptionsParams) WithEmail

WithEmail adds the email to the get subscriptions params

func (*GetSubscriptionsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get subscriptions params

func (*GetSubscriptionsParams) WithTimeout

WithTimeout adds the timeout to the get subscriptions params

func (*GetSubscriptionsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetSubscriptionsReader

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

GetSubscriptionsReader is a Reader for the GetSubscriptions structure.

func (*GetSubscriptionsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type SubscribeBadRequest

type SubscribeBadRequest struct {
}

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

Invalid input (e.g., invalid repo format)

func NewSubscribeBadRequest

func NewSubscribeBadRequest() *SubscribeBadRequest

NewSubscribeBadRequest creates a SubscribeBadRequest with default headers values

func (*SubscribeBadRequest) Code

func (o *SubscribeBadRequest) Code() int

Code gets the status code for the subscribe bad request response

func (*SubscribeBadRequest) Error

func (o *SubscribeBadRequest) Error() string

func (*SubscribeBadRequest) IsClientError

func (o *SubscribeBadRequest) IsClientError() bool

IsClientError returns true when this subscribe bad request response has a 4xx status code

func (*SubscribeBadRequest) IsCode

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

IsCode returns true when this subscribe bad request response a status code equal to that given

func (*SubscribeBadRequest) IsRedirect

func (o *SubscribeBadRequest) IsRedirect() bool

IsRedirect returns true when this subscribe bad request response has a 3xx status code

func (*SubscribeBadRequest) IsServerError

func (o *SubscribeBadRequest) IsServerError() bool

IsServerError returns true when this subscribe bad request response has a 5xx status code

func (*SubscribeBadRequest) IsSuccess

func (o *SubscribeBadRequest) IsSuccess() bool

IsSuccess returns true when this subscribe bad request response has a 2xx status code

func (*SubscribeBadRequest) String

func (o *SubscribeBadRequest) String() string

type SubscribeConflict

type SubscribeConflict struct {
}

SubscribeConflict describes a response with status code 409, with default header values.

Email already subscribed to this repository

func NewSubscribeConflict

func NewSubscribeConflict() *SubscribeConflict

NewSubscribeConflict creates a SubscribeConflict with default headers values

func (*SubscribeConflict) Code

func (o *SubscribeConflict) Code() int

Code gets the status code for the subscribe conflict response

func (*SubscribeConflict) Error

func (o *SubscribeConflict) Error() string

func (*SubscribeConflict) IsClientError

func (o *SubscribeConflict) IsClientError() bool

IsClientError returns true when this subscribe conflict response has a 4xx status code

func (*SubscribeConflict) IsCode

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

IsCode returns true when this subscribe conflict response a status code equal to that given

func (*SubscribeConflict) IsRedirect

func (o *SubscribeConflict) IsRedirect() bool

IsRedirect returns true when this subscribe conflict response has a 3xx status code

func (*SubscribeConflict) IsServerError

func (o *SubscribeConflict) IsServerError() bool

IsServerError returns true when this subscribe conflict response has a 5xx status code

func (*SubscribeConflict) IsSuccess

func (o *SubscribeConflict) IsSuccess() bool

IsSuccess returns true when this subscribe conflict response has a 2xx status code

func (*SubscribeConflict) String

func (o *SubscribeConflict) String() string

type SubscribeNotFound

type SubscribeNotFound struct {
}

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

Repository not found on GitHub

func NewSubscribeNotFound

func NewSubscribeNotFound() *SubscribeNotFound

NewSubscribeNotFound creates a SubscribeNotFound with default headers values

func (*SubscribeNotFound) Code

func (o *SubscribeNotFound) Code() int

Code gets the status code for the subscribe not found response

func (*SubscribeNotFound) Error

func (o *SubscribeNotFound) Error() string

func (*SubscribeNotFound) IsClientError

func (o *SubscribeNotFound) IsClientError() bool

IsClientError returns true when this subscribe not found response has a 4xx status code

func (*SubscribeNotFound) IsCode

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

IsCode returns true when this subscribe not found response a status code equal to that given

func (*SubscribeNotFound) IsRedirect

func (o *SubscribeNotFound) IsRedirect() bool

IsRedirect returns true when this subscribe not found response has a 3xx status code

func (*SubscribeNotFound) IsServerError

func (o *SubscribeNotFound) IsServerError() bool

IsServerError returns true when this subscribe not found response has a 5xx status code

func (*SubscribeNotFound) IsSuccess

func (o *SubscribeNotFound) IsSuccess() bool

IsSuccess returns true when this subscribe not found response has a 2xx status code

func (*SubscribeNotFound) String

func (o *SubscribeNotFound) String() string

type SubscribeOK

type SubscribeOK struct {
}

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

Subscription successful. Confirmation email sent.

func NewSubscribeOK

func NewSubscribeOK() *SubscribeOK

NewSubscribeOK creates a SubscribeOK with default headers values

func (*SubscribeOK) Code

func (o *SubscribeOK) Code() int

Code gets the status code for the subscribe o k response

func (*SubscribeOK) Error

func (o *SubscribeOK) Error() string

func (*SubscribeOK) IsClientError

func (o *SubscribeOK) IsClientError() bool

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

func (*SubscribeOK) IsCode

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

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

func (*SubscribeOK) IsRedirect

func (o *SubscribeOK) IsRedirect() bool

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

func (*SubscribeOK) IsServerError

func (o *SubscribeOK) IsServerError() bool

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

func (*SubscribeOK) IsSuccess

func (o *SubscribeOK) IsSuccess() bool

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

func (*SubscribeOK) String

func (o *SubscribeOK) String() string

type SubscribeParams

type SubscribeParams struct {

	/* Email.

	   Email address to subscribe
	*/
	Email string

	/* Repo.

	   GitHub repository in owner/repo format (e.g., golang/go)
	*/
	Repo string

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

SubscribeParams contains all the parameters to send to the API endpoint

for the subscribe operation.

Typically these are written to a http.Request.

func NewSubscribeParams

func NewSubscribeParams() *SubscribeParams

NewSubscribeParams creates a new SubscribeParams 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 NewSubscribeParamsWithContext

func NewSubscribeParamsWithContext(ctx context.Context) *SubscribeParams

NewSubscribeParamsWithContext creates a new SubscribeParams object with the ability to set a context for a request.

func NewSubscribeParamsWithHTTPClient

func NewSubscribeParamsWithHTTPClient(client *http.Client) *SubscribeParams

NewSubscribeParamsWithHTTPClient creates a new SubscribeParams object with the ability to set a custom HTTPClient for a request.

func NewSubscribeParamsWithTimeout

func NewSubscribeParamsWithTimeout(timeout time.Duration) *SubscribeParams

NewSubscribeParamsWithTimeout creates a new SubscribeParams object with the ability to set a timeout on a request.

func (*SubscribeParams) SetContext

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

SetContext adds the context to the subscribe params

func (*SubscribeParams) SetDefaults

func (o *SubscribeParams) SetDefaults()

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

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

func (*SubscribeParams) SetEmail

func (o *SubscribeParams) SetEmail(email string)

SetEmail adds the email to the subscribe params

func (*SubscribeParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the subscribe params

func (*SubscribeParams) SetRepo

func (o *SubscribeParams) SetRepo(repo string)

SetRepo adds the repo to the subscribe params

func (*SubscribeParams) SetTimeout

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

SetTimeout adds the timeout to the subscribe params

func (*SubscribeParams) WithContext

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

WithContext adds the context to the subscribe params

func (*SubscribeParams) WithDefaults

func (o *SubscribeParams) WithDefaults() *SubscribeParams

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

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

func (*SubscribeParams) WithEmail

func (o *SubscribeParams) WithEmail(email string) *SubscribeParams

WithEmail adds the email to the subscribe params

func (*SubscribeParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the subscribe params

func (*SubscribeParams) WithRepo

func (o *SubscribeParams) WithRepo(repo string) *SubscribeParams

WithRepo adds the repo to the subscribe params

func (*SubscribeParams) WithTimeout

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

WithTimeout adds the timeout to the subscribe params

func (*SubscribeParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type SubscribeReader

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

SubscribeReader is a Reader for the Subscribe structure.

func (*SubscribeReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type UnsubscribeBadRequest

type UnsubscribeBadRequest struct {
}

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

Invalid token

func NewUnsubscribeBadRequest

func NewUnsubscribeBadRequest() *UnsubscribeBadRequest

NewUnsubscribeBadRequest creates a UnsubscribeBadRequest with default headers values

func (*UnsubscribeBadRequest) Code

func (o *UnsubscribeBadRequest) Code() int

Code gets the status code for the unsubscribe bad request response

func (*UnsubscribeBadRequest) Error

func (o *UnsubscribeBadRequest) Error() string

func (*UnsubscribeBadRequest) IsClientError

func (o *UnsubscribeBadRequest) IsClientError() bool

IsClientError returns true when this unsubscribe bad request response has a 4xx status code

func (*UnsubscribeBadRequest) IsCode

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

IsCode returns true when this unsubscribe bad request response a status code equal to that given

func (*UnsubscribeBadRequest) IsRedirect

func (o *UnsubscribeBadRequest) IsRedirect() bool

IsRedirect returns true when this unsubscribe bad request response has a 3xx status code

func (*UnsubscribeBadRequest) IsServerError

func (o *UnsubscribeBadRequest) IsServerError() bool

IsServerError returns true when this unsubscribe bad request response has a 5xx status code

func (*UnsubscribeBadRequest) IsSuccess

func (o *UnsubscribeBadRequest) IsSuccess() bool

IsSuccess returns true when this unsubscribe bad request response has a 2xx status code

func (*UnsubscribeBadRequest) String

func (o *UnsubscribeBadRequest) String() string

type UnsubscribeNotFound

type UnsubscribeNotFound struct {
}

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

Token not found

func NewUnsubscribeNotFound

func NewUnsubscribeNotFound() *UnsubscribeNotFound

NewUnsubscribeNotFound creates a UnsubscribeNotFound with default headers values

func (*UnsubscribeNotFound) Code

func (o *UnsubscribeNotFound) Code() int

Code gets the status code for the unsubscribe not found response

func (*UnsubscribeNotFound) Error

func (o *UnsubscribeNotFound) Error() string

func (*UnsubscribeNotFound) IsClientError

func (o *UnsubscribeNotFound) IsClientError() bool

IsClientError returns true when this unsubscribe not found response has a 4xx status code

func (*UnsubscribeNotFound) IsCode

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

IsCode returns true when this unsubscribe not found response a status code equal to that given

func (*UnsubscribeNotFound) IsRedirect

func (o *UnsubscribeNotFound) IsRedirect() bool

IsRedirect returns true when this unsubscribe not found response has a 3xx status code

func (*UnsubscribeNotFound) IsServerError

func (o *UnsubscribeNotFound) IsServerError() bool

IsServerError returns true when this unsubscribe not found response has a 5xx status code

func (*UnsubscribeNotFound) IsSuccess

func (o *UnsubscribeNotFound) IsSuccess() bool

IsSuccess returns true when this unsubscribe not found response has a 2xx status code

func (*UnsubscribeNotFound) String

func (o *UnsubscribeNotFound) String() string

type UnsubscribeOK

type UnsubscribeOK struct {
}

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

Unsubscribed successfully

func NewUnsubscribeOK

func NewUnsubscribeOK() *UnsubscribeOK

NewUnsubscribeOK creates a UnsubscribeOK with default headers values

func (*UnsubscribeOK) Code

func (o *UnsubscribeOK) Code() int

Code gets the status code for the unsubscribe o k response

func (*UnsubscribeOK) Error

func (o *UnsubscribeOK) Error() string

func (*UnsubscribeOK) IsClientError

func (o *UnsubscribeOK) IsClientError() bool

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

func (*UnsubscribeOK) IsCode

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

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

func (*UnsubscribeOK) IsRedirect

func (o *UnsubscribeOK) IsRedirect() bool

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

func (*UnsubscribeOK) IsServerError

func (o *UnsubscribeOK) IsServerError() bool

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

func (*UnsubscribeOK) IsSuccess

func (o *UnsubscribeOK) IsSuccess() bool

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

func (*UnsubscribeOK) String

func (o *UnsubscribeOK) String() string

type UnsubscribeParams

type UnsubscribeParams struct {

	/* Token.

	   Unsubscribe token
	*/
	Token string

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

UnsubscribeParams contains all the parameters to send to the API endpoint

for the unsubscribe operation.

Typically these are written to a http.Request.

func NewUnsubscribeParams

func NewUnsubscribeParams() *UnsubscribeParams

NewUnsubscribeParams creates a new UnsubscribeParams 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 NewUnsubscribeParamsWithContext

func NewUnsubscribeParamsWithContext(ctx context.Context) *UnsubscribeParams

NewUnsubscribeParamsWithContext creates a new UnsubscribeParams object with the ability to set a context for a request.

func NewUnsubscribeParamsWithHTTPClient

func NewUnsubscribeParamsWithHTTPClient(client *http.Client) *UnsubscribeParams

NewUnsubscribeParamsWithHTTPClient creates a new UnsubscribeParams object with the ability to set a custom HTTPClient for a request.

func NewUnsubscribeParamsWithTimeout

func NewUnsubscribeParamsWithTimeout(timeout time.Duration) *UnsubscribeParams

NewUnsubscribeParamsWithTimeout creates a new UnsubscribeParams object with the ability to set a timeout on a request.

func (*UnsubscribeParams) SetContext

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

SetContext adds the context to the unsubscribe params

func (*UnsubscribeParams) SetDefaults

func (o *UnsubscribeParams) SetDefaults()

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

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

func (*UnsubscribeParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the unsubscribe params

func (*UnsubscribeParams) SetTimeout

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

SetTimeout adds the timeout to the unsubscribe params

func (*UnsubscribeParams) SetToken

func (o *UnsubscribeParams) SetToken(token string)

SetToken adds the token to the unsubscribe params

func (*UnsubscribeParams) WithContext

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

WithContext adds the context to the unsubscribe params

func (*UnsubscribeParams) WithDefaults

func (o *UnsubscribeParams) WithDefaults() *UnsubscribeParams

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

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

func (*UnsubscribeParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the unsubscribe params

func (*UnsubscribeParams) WithTimeout

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

WithTimeout adds the timeout to the unsubscribe params

func (*UnsubscribeParams) WithToken

func (o *UnsubscribeParams) WithToken(token string) *UnsubscribeParams

WithToken adds the token to the unsubscribe params

func (*UnsubscribeParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type UnsubscribeReader

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

UnsubscribeReader is a Reader for the Unsubscribe structure.

func (*UnsubscribeReader) ReadResponse

func (o *UnsubscribeReader) 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