Documentation ¶
Overview ¶
Package openapi provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.14.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type GetV1TimelinesHomeParams
- type GetV1TimelinesUserParams
- type GetV1UsersFollowersParams
- type GetV1UsersFollowersPubkeysParams
- type GetV1UsersFollowingParams
- type GetV1UsersFollowingPubkeysParams
- type GetV1UsersParams
- type Keys
- type MaxResultsParameter
- type Paging
- type Post
- type PostCommentRequest
- type PostV1PostsJSONBody
- type PostV1PostsJSONRequestBody
- type PostV1UsersJSONBody
- type PostV1UsersJSONRequestBody
- type Posts
- type PubKeysResponse
- type PubkeyParameter
- type Pubkeys
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) GetV1TimelinesHome(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1TimelinesUser(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1Users(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1UsersFollowers(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1UsersFollowersPubkeys(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1UsersFollowing(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetV1UsersFollowingPubkeys(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PostV1Posts(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) PostV1Users(ctx echo.Context) error
- type SinceTimeParameter
- type UntilTimePatameter
- type User
- type UserResponse
- type Users
- type UsersPubKeyRequest
- type UsersResponse
- type UsersTimelineResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type GetV1TimelinesHomeParams ¶
type GetV1TimelinesHomeParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` // MaxResults Specifies the number of Posts to try and retrieve (default 20) MaxResults *MaxResultsParameter `form:"max_results,omitempty" json:"max_results,omitempty"` // SinceTime Get posts after that time (include) SinceTime *SinceTimeParameter `form:"since_time,omitempty" json:"since_time,omitempty"` // UntilTime Get posts up to that time (exclude) UntilTime *UntilTimePatameter `form:"until_time,omitempty" json:"until_time,omitempty"` }
GetV1TimelinesHomeParams defines parameters for GetV1TimelinesHome.
type GetV1TimelinesUserParams ¶
type GetV1TimelinesUserParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` // MaxResults Specifies the number of Posts to try and retrieve (default 20) MaxResults *MaxResultsParameter `form:"max_results,omitempty" json:"max_results,omitempty"` // SinceTime Get posts after that time (include) SinceTime *SinceTimeParameter `form:"since_time,omitempty" json:"since_time,omitempty"` // UntilTime Get posts up to that time (exclude) UntilTime *UntilTimePatameter `form:"until_time,omitempty" json:"until_time,omitempty"` }
GetV1TimelinesUserParams defines parameters for GetV1TimelinesUser.
type GetV1UsersFollowersParams ¶
type GetV1UsersFollowersParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` }
GetV1UsersFollowersParams defines parameters for GetV1UsersFollowers.
type GetV1UsersFollowersPubkeysParams ¶
type GetV1UsersFollowersPubkeysParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` }
GetV1UsersFollowersPubkeysParams defines parameters for GetV1UsersFollowersPubkeys.
type GetV1UsersFollowingParams ¶
type GetV1UsersFollowingParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` }
GetV1UsersFollowingParams defines parameters for GetV1UsersFollowing.
type GetV1UsersFollowingPubkeysParams ¶
type GetV1UsersFollowingPubkeysParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` }
GetV1UsersFollowingPubkeysParams defines parameters for GetV1UsersFollowingPubkeys.
type GetV1UsersParams ¶
type GetV1UsersParams struct { // Pubkey Public key of the user Pubkey PubkeyParameter `form:"pubkey" json:"pubkey"` }
GetV1UsersParams defines parameters for GetV1Users.
type MaxResultsParameter ¶
type MaxResultsParameter = int
MaxResultsParameter defines model for MaxResultsParameter.
type Paging ¶
type Paging struct { // FutureSinceTime Specify when to get future posts from this result FutureSinceTime string `json:"future_since_time"` // PastUntileTime Specify when to get past posts from this result PastUntileTime string `json:"past_untile_time"` }
Paging defines model for Paging.
type Post ¶
type Post struct { // Content Raw text of post content. Content string `json:"content"` // CreatedAt Time post was created (UTC) CreatedAt string `json:"created_at"` Id string `json:"id"` User User `json:"user"` }
Post defines model for Post.
type PostCommentRequest ¶
PostCommentRequest defines model for PostCommentRequest.
type PostV1PostsJSONBody ¶
PostV1PostsJSONBody defines parameters for PostV1Posts.
type PostV1PostsJSONRequestBody ¶
type PostV1PostsJSONRequestBody PostV1PostsJSONBody
PostV1PostsJSONRequestBody defines body for PostV1Posts for application/json ContentType.
type PostV1UsersJSONBody ¶
type PostV1UsersJSONBody struct { // Pubkeys Public key of the user to retrieve Pubkeys []string `json:"pubkeys"` }
PostV1UsersJSONBody defines parameters for PostV1Users.
type PostV1UsersJSONRequestBody ¶
type PostV1UsersJSONRequestBody PostV1UsersJSONBody
PostV1UsersJSONRequestBody defines body for PostV1Users for application/json ContentType.
type Posts ¶
type Posts struct { // Count Number of list Count int `json:"count"` // List Post list List []Post `json:"list"` }
Posts defines model for Posts.
type PubKeysResponse ¶
type PubKeysResponse struct { // Count Number of pubkeys Count int `json:"count"` // Pubkeys User's PublicKeys Pubkeys Pubkeys `json:"pubkeys"` }
PubKeysResponse defines model for PubKeysResponse.
type PubkeyParameter ¶
type PubkeyParameter = string
PubkeyParameter defines model for PubkeyParameter.
type ServerInterface ¶
type ServerInterface interface { // Post Comment // (POST /v1/posts) PostV1Posts(ctx echo.Context) error // Get Home Timeline // (GET /v1/timelines/home) GetV1TimelinesHome(ctx echo.Context, params GetV1TimelinesHomeParams) error // Get User Timeline // (GET /v1/timelines/user) GetV1TimelinesUser(ctx echo.Context, params GetV1TimelinesUserParams) error // GET User Profiles // (GET /v1/users) GetV1Users(ctx echo.Context, params GetV1UsersParams) error // GET Users Profiles // (POST /v1/users) PostV1Users(ctx echo.Context) error // Get User's Followers // (GET /v1/users/followers) GetV1UsersFollowers(ctx echo.Context, params GetV1UsersFollowersParams) error // Get User's Follower's PublicKeys // (GET /v1/users/followers/pubkeys) GetV1UsersFollowersPubkeys(ctx echo.Context, params GetV1UsersFollowersPubkeysParams) error // Get Following Users // (GET /v1/users/following) GetV1UsersFollowing(ctx echo.Context, params GetV1UsersFollowingParams) error // Get Following User's PublicKeys // (GET /v1/users/following/pubkeys) GetV1UsersFollowingPubkeys(ctx echo.Context, params GetV1UsersFollowingPubkeysParams) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) GetV1TimelinesHome ¶
func (w *ServerInterfaceWrapper) GetV1TimelinesHome(ctx echo.Context) error
GetV1TimelinesHome converts echo context to params.
func (*ServerInterfaceWrapper) GetV1TimelinesUser ¶
func (w *ServerInterfaceWrapper) GetV1TimelinesUser(ctx echo.Context) error
GetV1TimelinesUser converts echo context to params.
func (*ServerInterfaceWrapper) GetV1Users ¶
func (w *ServerInterfaceWrapper) GetV1Users(ctx echo.Context) error
GetV1Users converts echo context to params.
func (*ServerInterfaceWrapper) GetV1UsersFollowers ¶
func (w *ServerInterfaceWrapper) GetV1UsersFollowers(ctx echo.Context) error
GetV1UsersFollowers converts echo context to params.
func (*ServerInterfaceWrapper) GetV1UsersFollowersPubkeys ¶
func (w *ServerInterfaceWrapper) GetV1UsersFollowersPubkeys(ctx echo.Context) error
GetV1UsersFollowersPubkeys converts echo context to params.
func (*ServerInterfaceWrapper) GetV1UsersFollowing ¶
func (w *ServerInterfaceWrapper) GetV1UsersFollowing(ctx echo.Context) error
GetV1UsersFollowing converts echo context to params.
func (*ServerInterfaceWrapper) GetV1UsersFollowingPubkeys ¶
func (w *ServerInterfaceWrapper) GetV1UsersFollowingPubkeys(ctx echo.Context) error
GetV1UsersFollowingPubkeys converts echo context to params.
func (*ServerInterfaceWrapper) PostV1Posts ¶
func (w *ServerInterfaceWrapper) PostV1Posts(ctx echo.Context) error
PostV1Posts converts echo context to params.
func (*ServerInterfaceWrapper) PostV1Users ¶
func (w *ServerInterfaceWrapper) PostV1Users(ctx echo.Context) error
PostV1Users converts echo context to params.
type SinceTimeParameter ¶
type SinceTimeParameter = string
SinceTimeParameter defines model for SinceTimeParameter.
type UntilTimePatameter ¶
type UntilTimePatameter = string
UntilTimePatameter defines model for UntilTimePatameter.
type User ¶
type User struct { // About User description About *string `json:"about,omitempty"` // Banner User profile banner image url Banner *string `json:"banner,omitempty"` // DisplayName User display name DisplayName *string `json:"display_name,omitempty"` // Name User name Name *string `json:"name,omitempty"` // Picture User icon image url Picture *string `json:"picture,omitempty"` // Pubkey User public key (user idenitifier) Pubkey string `json:"pubkey"` // Website User website url Website *string `json:"website,omitempty"` }
User defines model for User.
type Users ¶
type Users struct { // Count Number of list Count int `json:"count"` // List User list List []User `json:"list"` }
Users defines model for Users.
type UsersPubKeyRequest ¶
type UsersPubKeyRequest struct { // Pubkeys Public key of the user to retrieve Pubkeys []string `json:"pubkeys"` }
UsersPubKeyRequest defines model for UsersPubKeyRequest.
type UsersTimelineResponse ¶
type UsersTimelineResponse struct { Paging *Paging `json:"paging,omitempty"` Posts Posts `json:"posts"` // Pubkeys User's PublicKeys Pubkeys Pubkeys `json:"pubkeys"` }
UsersTimelineResponse defines model for UsersTimelineResponse.