directory

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-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 directory API

func (*Client) DirectoryGet

func (a *Client) DirectoryGet(params *DirectoryGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DirectoryGetOK, error)
DirectoryGet gets an array of accounts on this instance that have marked themselves as being discoverable in the directory

If instance-directory-mode is set to "full" then this API endpoint will be available without authentication, otherwise a token must be provided.

Unlike Mastodon and other fedi softwares, this endpoint only supports showing local accounts.

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.

type ClientService

type ClientService interface {
	DirectoryGet(params *DirectoryGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DirectoryGetOK, 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 directory API client.

func NewClientWithBasicAuth

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

New creates a new directory 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 directory 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 DirectoryGetInternalServerError

type DirectoryGetInternalServerError struct {
	Payload *models.Error
}

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

internal server error

func NewDirectoryGetInternalServerError

func NewDirectoryGetInternalServerError() *DirectoryGetInternalServerError

NewDirectoryGetInternalServerError creates a DirectoryGetInternalServerError with default headers values

func (*DirectoryGetInternalServerError) Code

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

func (*DirectoryGetInternalServerError) Error

func (*DirectoryGetInternalServerError) GetPayload

func (o *DirectoryGetInternalServerError) GetPayload() *models.Error

func (*DirectoryGetInternalServerError) IsClientError

func (o *DirectoryGetInternalServerError) IsClientError() bool

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

func (*DirectoryGetInternalServerError) IsCode

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

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

func (*DirectoryGetInternalServerError) IsRedirect

func (o *DirectoryGetInternalServerError) IsRedirect() bool

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

func (*DirectoryGetInternalServerError) IsServerError

func (o *DirectoryGetInternalServerError) IsServerError() bool

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

func (*DirectoryGetInternalServerError) IsSuccess

func (o *DirectoryGetInternalServerError) IsSuccess() bool

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

func (*DirectoryGetInternalServerError) String

type DirectoryGetNotAcceptable

type DirectoryGetNotAcceptable struct {
	Payload *models.Error
}

DirectoryGetNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewDirectoryGetNotAcceptable

func NewDirectoryGetNotAcceptable() *DirectoryGetNotAcceptable

NewDirectoryGetNotAcceptable creates a DirectoryGetNotAcceptable with default headers values

func (*DirectoryGetNotAcceptable) Code

func (o *DirectoryGetNotAcceptable) Code() int

Code gets the status code for the directory get not acceptable response

func (*DirectoryGetNotAcceptable) Error

func (o *DirectoryGetNotAcceptable) Error() string

func (*DirectoryGetNotAcceptable) GetPayload

func (o *DirectoryGetNotAcceptable) GetPayload() *models.Error

func (*DirectoryGetNotAcceptable) IsClientError

func (o *DirectoryGetNotAcceptable) IsClientError() bool

IsClientError returns true when this directory get not acceptable response has a 4xx status code

func (*DirectoryGetNotAcceptable) IsCode

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

IsCode returns true when this directory get not acceptable response a status code equal to that given

func (*DirectoryGetNotAcceptable) IsRedirect

func (o *DirectoryGetNotAcceptable) IsRedirect() bool

IsRedirect returns true when this directory get not acceptable response has a 3xx status code

func (*DirectoryGetNotAcceptable) IsServerError

func (o *DirectoryGetNotAcceptable) IsServerError() bool

IsServerError returns true when this directory get not acceptable response has a 5xx status code

func (*DirectoryGetNotAcceptable) IsSuccess

func (o *DirectoryGetNotAcceptable) IsSuccess() bool

IsSuccess returns true when this directory get not acceptable response has a 2xx status code

func (*DirectoryGetNotAcceptable) String

func (o *DirectoryGetNotAcceptable) String() string

type DirectoryGetOK

type DirectoryGetOK struct {

	/* Links to the next and previous queries.
	 */
	Link string

	Payload []*models.Account
}

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

Array of accounts.

func NewDirectoryGetOK

func NewDirectoryGetOK() *DirectoryGetOK

NewDirectoryGetOK creates a DirectoryGetOK with default headers values

func (*DirectoryGetOK) Code

func (o *DirectoryGetOK) Code() int

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

func (*DirectoryGetOK) Error

func (o *DirectoryGetOK) Error() string

func (*DirectoryGetOK) GetPayload

func (o *DirectoryGetOK) GetPayload() []*models.Account

func (*DirectoryGetOK) IsClientError

func (o *DirectoryGetOK) IsClientError() bool

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

func (*DirectoryGetOK) IsCode

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

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

func (*DirectoryGetOK) IsRedirect

func (o *DirectoryGetOK) IsRedirect() bool

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

func (*DirectoryGetOK) IsServerError

func (o *DirectoryGetOK) IsServerError() bool

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

func (*DirectoryGetOK) IsSuccess

func (o *DirectoryGetOK) IsSuccess() bool

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

func (*DirectoryGetOK) String

func (o *DirectoryGetOK) String() string

type DirectoryGetParams

type DirectoryGetParams struct {

	/* Limit.

	   Number of accounts to return.

	   Default: 40
	*/
	Limit *int64

	/* MaxID.

	   Return only items after than the given max ID. The item with the specified ID will not be included in the response. Parameter ignored if offset is specified.
	*/
	MaxID *string

	/* MinID.

	   Return only items *IMMEDIATELY BEFORE* the given min ID. The item with the specified ID will not be included in the response. Parameter ignored if offset is specified.
	*/
	MinID *string

	/* Offset.

	   Skip the first n results. If offset is provided, other paging parameters will be ignored.
	*/
	Offset *int64

	/* Order.

	   Use 'active' to sort by most recently posted statuses (default), or 'new' to sort by most recently created profiles.
	*/
	Order *string

	/* SinceID.

	   Return only items before the given since ID. The item with the specified ID will not be included in the response. Parameter ignored if offset is specified.
	*/
	SinceID *string

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

DirectoryGetParams contains all the parameters to send to the API endpoint

for the directory get operation.

Typically these are written to a http.Request.

func NewDirectoryGetParams

func NewDirectoryGetParams() *DirectoryGetParams

NewDirectoryGetParams creates a new DirectoryGetParams 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 NewDirectoryGetParamsWithContext

func NewDirectoryGetParamsWithContext(ctx context.Context) *DirectoryGetParams

NewDirectoryGetParamsWithContext creates a new DirectoryGetParams object with the ability to set a context for a request.

func NewDirectoryGetParamsWithHTTPClient

func NewDirectoryGetParamsWithHTTPClient(client *http.Client) *DirectoryGetParams

NewDirectoryGetParamsWithHTTPClient creates a new DirectoryGetParams object with the ability to set a custom HTTPClient for a request.

func NewDirectoryGetParamsWithTimeout

func NewDirectoryGetParamsWithTimeout(timeout time.Duration) *DirectoryGetParams

NewDirectoryGetParamsWithTimeout creates a new DirectoryGetParams object with the ability to set a timeout on a request.

func (*DirectoryGetParams) SetContext

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

SetContext adds the context to the directory get params

func (*DirectoryGetParams) SetDefaults

func (o *DirectoryGetParams) SetDefaults()

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

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

func (*DirectoryGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the directory get params

func (*DirectoryGetParams) SetLimit

func (o *DirectoryGetParams) SetLimit(limit *int64)

SetLimit adds the limit to the directory get params

func (*DirectoryGetParams) SetMaxID

func (o *DirectoryGetParams) SetMaxID(maxID *string)

SetMaxID adds the maxId to the directory get params

func (*DirectoryGetParams) SetMinID

func (o *DirectoryGetParams) SetMinID(minID *string)

SetMinID adds the minId to the directory get params

func (*DirectoryGetParams) SetOffset

func (o *DirectoryGetParams) SetOffset(offset *int64)

SetOffset adds the offset to the directory get params

func (*DirectoryGetParams) SetOrder

func (o *DirectoryGetParams) SetOrder(order *string)

SetOrder adds the order to the directory get params

func (*DirectoryGetParams) SetSinceID

func (o *DirectoryGetParams) SetSinceID(sinceID *string)

SetSinceID adds the sinceId to the directory get params

func (*DirectoryGetParams) SetTimeout

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

SetTimeout adds the timeout to the directory get params

func (*DirectoryGetParams) WithContext

WithContext adds the context to the directory get params

func (*DirectoryGetParams) WithDefaults

func (o *DirectoryGetParams) WithDefaults() *DirectoryGetParams

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

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

func (*DirectoryGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the directory get params

func (*DirectoryGetParams) WithLimit

func (o *DirectoryGetParams) WithLimit(limit *int64) *DirectoryGetParams

WithLimit adds the limit to the directory get params

func (*DirectoryGetParams) WithMaxID

func (o *DirectoryGetParams) WithMaxID(maxID *string) *DirectoryGetParams

WithMaxID adds the maxID to the directory get params

func (*DirectoryGetParams) WithMinID

func (o *DirectoryGetParams) WithMinID(minID *string) *DirectoryGetParams

WithMinID adds the minID to the directory get params

func (*DirectoryGetParams) WithOffset

func (o *DirectoryGetParams) WithOffset(offset *int64) *DirectoryGetParams

WithOffset adds the offset to the directory get params

func (*DirectoryGetParams) WithOrder

func (o *DirectoryGetParams) WithOrder(order *string) *DirectoryGetParams

WithOrder adds the order to the directory get params

func (*DirectoryGetParams) WithSinceID

func (o *DirectoryGetParams) WithSinceID(sinceID *string) *DirectoryGetParams

WithSinceID adds the sinceID to the directory get params

func (*DirectoryGetParams) WithTimeout

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

WithTimeout adds the timeout to the directory get params

func (*DirectoryGetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DirectoryGetReader

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

DirectoryGetReader is a Reader for the DirectoryGet structure.

func (*DirectoryGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type DirectoryGetUnauthorized

type DirectoryGetUnauthorized struct {
	Payload *models.Error
}

DirectoryGetUnauthorized describes a response with status code 401, with default header values.

unauthorized

func NewDirectoryGetUnauthorized

func NewDirectoryGetUnauthorized() *DirectoryGetUnauthorized

NewDirectoryGetUnauthorized creates a DirectoryGetUnauthorized with default headers values

func (*DirectoryGetUnauthorized) Code

func (o *DirectoryGetUnauthorized) Code() int

Code gets the status code for the directory get unauthorized response

func (*DirectoryGetUnauthorized) Error

func (o *DirectoryGetUnauthorized) Error() string

func (*DirectoryGetUnauthorized) GetPayload

func (o *DirectoryGetUnauthorized) GetPayload() *models.Error

func (*DirectoryGetUnauthorized) IsClientError

func (o *DirectoryGetUnauthorized) IsClientError() bool

IsClientError returns true when this directory get unauthorized response has a 4xx status code

func (*DirectoryGetUnauthorized) IsCode

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

IsCode returns true when this directory get unauthorized response a status code equal to that given

func (*DirectoryGetUnauthorized) IsRedirect

func (o *DirectoryGetUnauthorized) IsRedirect() bool

IsRedirect returns true when this directory get unauthorized response has a 3xx status code

func (*DirectoryGetUnauthorized) IsServerError

func (o *DirectoryGetUnauthorized) IsServerError() bool

IsServerError returns true when this directory get unauthorized response has a 5xx status code

func (*DirectoryGetUnauthorized) IsSuccess

func (o *DirectoryGetUnauthorized) IsSuccess() bool

IsSuccess returns true when this directory get unauthorized response has a 2xx status code

func (*DirectoryGetUnauthorized) String

func (o *DirectoryGetUnauthorized) String() string

Jump to

Keyboard shortcuts

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