activitypub

package
v0.0.0-...-078138e Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 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 WithContentTypeTextPlain

func WithContentTypeTextPlain(r *runtime.ClientOperation)

WithContentTypeTextPlain sets the Content-Type header to "text/plain".

Types

type ActivitypubPersonInboxNoContent

type ActivitypubPersonInboxNoContent struct {
}

ActivitypubPersonInboxNoContent describes a response with status code 204, with default header values.

APIEmpty is an empty response

func NewActivitypubPersonInboxNoContent

func NewActivitypubPersonInboxNoContent() *ActivitypubPersonInboxNoContent

NewActivitypubPersonInboxNoContent creates a ActivitypubPersonInboxNoContent with default headers values

func (*ActivitypubPersonInboxNoContent) Code

Code gets the status code for the activitypub person inbox no content response

func (*ActivitypubPersonInboxNoContent) Error

func (*ActivitypubPersonInboxNoContent) IsClientError

func (o *ActivitypubPersonInboxNoContent) IsClientError() bool

IsClientError returns true when this activitypub person inbox no content response has a 4xx status code

func (*ActivitypubPersonInboxNoContent) IsCode

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

IsCode returns true when this activitypub person inbox no content response a status code equal to that given

func (*ActivitypubPersonInboxNoContent) IsRedirect

func (o *ActivitypubPersonInboxNoContent) IsRedirect() bool

IsRedirect returns true when this activitypub person inbox no content response has a 3xx status code

func (*ActivitypubPersonInboxNoContent) IsServerError

func (o *ActivitypubPersonInboxNoContent) IsServerError() bool

IsServerError returns true when this activitypub person inbox no content response has a 5xx status code

func (*ActivitypubPersonInboxNoContent) IsSuccess

func (o *ActivitypubPersonInboxNoContent) IsSuccess() bool

IsSuccess returns true when this activitypub person inbox no content response has a 2xx status code

func (*ActivitypubPersonInboxNoContent) String

type ActivitypubPersonInboxParams

type ActivitypubPersonInboxParams struct {

	/* UserID.

	   user ID of the user
	*/
	UserID int64

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

ActivitypubPersonInboxParams contains all the parameters to send to the API endpoint

for the activitypub person inbox operation.

Typically these are written to a http.Request.

func NewActivitypubPersonInboxParams

func NewActivitypubPersonInboxParams() *ActivitypubPersonInboxParams

NewActivitypubPersonInboxParams creates a new ActivitypubPersonInboxParams 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 NewActivitypubPersonInboxParamsWithContext

func NewActivitypubPersonInboxParamsWithContext(ctx context.Context) *ActivitypubPersonInboxParams

NewActivitypubPersonInboxParamsWithContext creates a new ActivitypubPersonInboxParams object with the ability to set a context for a request.

func NewActivitypubPersonInboxParamsWithHTTPClient

func NewActivitypubPersonInboxParamsWithHTTPClient(client *http.Client) *ActivitypubPersonInboxParams

NewActivitypubPersonInboxParamsWithHTTPClient creates a new ActivitypubPersonInboxParams object with the ability to set a custom HTTPClient for a request.

func NewActivitypubPersonInboxParamsWithTimeout

func NewActivitypubPersonInboxParamsWithTimeout(timeout time.Duration) *ActivitypubPersonInboxParams

NewActivitypubPersonInboxParamsWithTimeout creates a new ActivitypubPersonInboxParams object with the ability to set a timeout on a request.

func (*ActivitypubPersonInboxParams) SetContext

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

SetContext adds the context to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) SetDefaults

func (o *ActivitypubPersonInboxParams) SetDefaults()

SetDefaults hydrates default values in the activitypub person inbox params (not the query body).

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

func (*ActivitypubPersonInboxParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) SetTimeout

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

SetTimeout adds the timeout to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) SetUserID

func (o *ActivitypubPersonInboxParams) SetUserID(userID int64)

SetUserID adds the userId to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) WithContext

WithContext adds the context to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) WithDefaults

WithDefaults hydrates default values in the activitypub person inbox params (not the query body).

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

func (*ActivitypubPersonInboxParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) WithTimeout

WithTimeout adds the timeout to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) WithUserID

WithUserID adds the userID to the activitypub person inbox params

func (*ActivitypubPersonInboxParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type ActivitypubPersonInboxReader

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

ActivitypubPersonInboxReader is a Reader for the ActivitypubPersonInbox structure.

func (*ActivitypubPersonInboxReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ActivitypubPersonOK

type ActivitypubPersonOK struct {
	Payload *models.ActivityPub
}

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

ActivityPub

func NewActivitypubPersonOK

func NewActivitypubPersonOK() *ActivitypubPersonOK

NewActivitypubPersonOK creates a ActivitypubPersonOK with default headers values

func (*ActivitypubPersonOK) Code

func (o *ActivitypubPersonOK) Code() int

Code gets the status code for the activitypub person o k response

func (*ActivitypubPersonOK) Error

func (o *ActivitypubPersonOK) Error() string

func (*ActivitypubPersonOK) GetPayload

func (o *ActivitypubPersonOK) GetPayload() *models.ActivityPub

func (*ActivitypubPersonOK) IsClientError

func (o *ActivitypubPersonOK) IsClientError() bool

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

func (*ActivitypubPersonOK) IsCode

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

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

func (*ActivitypubPersonOK) IsRedirect

func (o *ActivitypubPersonOK) IsRedirect() bool

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

func (*ActivitypubPersonOK) IsServerError

func (o *ActivitypubPersonOK) IsServerError() bool

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

func (*ActivitypubPersonOK) IsSuccess

func (o *ActivitypubPersonOK) IsSuccess() bool

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

func (*ActivitypubPersonOK) String

func (o *ActivitypubPersonOK) String() string

type ActivitypubPersonParams

type ActivitypubPersonParams struct {

	/* UserID.

	   user ID of the user
	*/
	UserID int64

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

ActivitypubPersonParams contains all the parameters to send to the API endpoint

for the activitypub person operation.

Typically these are written to a http.Request.

func NewActivitypubPersonParams

func NewActivitypubPersonParams() *ActivitypubPersonParams

NewActivitypubPersonParams creates a new ActivitypubPersonParams 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 NewActivitypubPersonParamsWithContext

func NewActivitypubPersonParamsWithContext(ctx context.Context) *ActivitypubPersonParams

NewActivitypubPersonParamsWithContext creates a new ActivitypubPersonParams object with the ability to set a context for a request.

func NewActivitypubPersonParamsWithHTTPClient

func NewActivitypubPersonParamsWithHTTPClient(client *http.Client) *ActivitypubPersonParams

NewActivitypubPersonParamsWithHTTPClient creates a new ActivitypubPersonParams object with the ability to set a custom HTTPClient for a request.

func NewActivitypubPersonParamsWithTimeout

func NewActivitypubPersonParamsWithTimeout(timeout time.Duration) *ActivitypubPersonParams

NewActivitypubPersonParamsWithTimeout creates a new ActivitypubPersonParams object with the ability to set a timeout on a request.

func (*ActivitypubPersonParams) SetContext

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

SetContext adds the context to the activitypub person params

func (*ActivitypubPersonParams) SetDefaults

func (o *ActivitypubPersonParams) SetDefaults()

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

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

func (*ActivitypubPersonParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the activitypub person params

func (*ActivitypubPersonParams) SetTimeout

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

SetTimeout adds the timeout to the activitypub person params

func (*ActivitypubPersonParams) SetUserID

func (o *ActivitypubPersonParams) SetUserID(userID int64)

SetUserID adds the userId to the activitypub person params

func (*ActivitypubPersonParams) WithContext

WithContext adds the context to the activitypub person params

func (*ActivitypubPersonParams) WithDefaults

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

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

func (*ActivitypubPersonParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the activitypub person params

func (*ActivitypubPersonParams) WithTimeout

WithTimeout adds the timeout to the activitypub person params

func (*ActivitypubPersonParams) WithUserID

func (o *ActivitypubPersonParams) WithUserID(userID int64) *ActivitypubPersonParams

WithUserID adds the userID to the activitypub person params

func (*ActivitypubPersonParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type ActivitypubPersonReader

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

ActivitypubPersonReader is a Reader for the ActivitypubPerson structure.

func (*ActivitypubPersonReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for activitypub API

func (*Client) ActivitypubPerson

func (a *Client) ActivitypubPerson(params *ActivitypubPersonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivitypubPersonOK, error)

ActivitypubPerson returns the person actor for a user

func (*Client) ActivitypubPersonInbox

func (a *Client) ActivitypubPersonInbox(params *ActivitypubPersonInboxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivitypubPersonInboxNoContent, error)

ActivitypubPersonInbox sends to the inbox

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 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 {
	ActivitypubPerson(params *ActivitypubPersonParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivitypubPersonOK, error)

	ActivitypubPersonInbox(params *ActivitypubPersonInboxParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ActivitypubPersonInboxNoContent, 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 activitypub API client.

func NewClientWithBasicAuth

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

New creates a new activitypub 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 activitypub 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.

Jump to

Keyboard shortcuts

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