api

package
v0.0.0-...-8f0113c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AddProject

type AddProject struct {
	ID              OptString                   `json:"id"`
	Created         OptDateTime                 `json:"created"`
	Modified        OptDateTime                 `json:"modified"`
	Type            string                      `json:"type"`
	Identifier      []AddProjectIdentifierItem  `json:"identifier"`
	IsFundedBy      OptAddProjectIsFundedBy     `json:"isFundedBy"`
	HasAcronym      []string                    `json:"hasAcronym"`
	Name            []AddProjectNameItem        `json:"name"`
	Description     []AddProjectDescriptionItem `json:"description"`
	FoundingDate    OptString                   `json:"foundingDate"`
	DissolutionDate OptString                   `json:"dissolutionDate"`
}

Merged schema. Ref: #/components/schemas/AddProject

func (*AddProject) Decode

func (s *AddProject) Decode(d *jx.Decoder) error

Decode decodes AddProject from json.

func (*AddProject) Encode

func (s *AddProject) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddProject) GetCreated

func (s *AddProject) GetCreated() OptDateTime

GetCreated returns the value of Created.

func (*AddProject) GetDescription

func (s *AddProject) GetDescription() []AddProjectDescriptionItem

GetDescription returns the value of Description.

func (*AddProject) GetDissolutionDate

func (s *AddProject) GetDissolutionDate() OptString

GetDissolutionDate returns the value of DissolutionDate.

func (*AddProject) GetFoundingDate

func (s *AddProject) GetFoundingDate() OptString

GetFoundingDate returns the value of FoundingDate.

func (*AddProject) GetHasAcronym

func (s *AddProject) GetHasAcronym() []string

GetHasAcronym returns the value of HasAcronym.

func (*AddProject) GetID

func (s *AddProject) GetID() OptString

GetID returns the value of ID.

func (*AddProject) GetIdentifier

func (s *AddProject) GetIdentifier() []AddProjectIdentifierItem

GetIdentifier returns the value of Identifier.

func (*AddProject) GetIsFundedBy

func (s *AddProject) GetIsFundedBy() OptAddProjectIsFundedBy

GetIsFundedBy returns the value of IsFundedBy.

func (*AddProject) GetModified

func (s *AddProject) GetModified() OptDateTime

GetModified returns the value of Modified.

func (*AddProject) GetName

func (s *AddProject) GetName() []AddProjectNameItem

GetName returns the value of Name.

func (*AddProject) GetType

func (s *AddProject) GetType() string

GetType returns the value of Type.

func (*AddProject) MarshalJSON

func (s *AddProject) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProject) SetCreated

func (s *AddProject) SetCreated(val OptDateTime)

SetCreated sets the value of Created.

func (*AddProject) SetDescription

func (s *AddProject) SetDescription(val []AddProjectDescriptionItem)

SetDescription sets the value of Description.

func (*AddProject) SetDissolutionDate

func (s *AddProject) SetDissolutionDate(val OptString)

SetDissolutionDate sets the value of DissolutionDate.

func (*AddProject) SetFoundingDate

func (s *AddProject) SetFoundingDate(val OptString)

SetFoundingDate sets the value of FoundingDate.

func (*AddProject) SetHasAcronym

func (s *AddProject) SetHasAcronym(val []string)

SetHasAcronym sets the value of HasAcronym.

func (*AddProject) SetID

func (s *AddProject) SetID(val OptString)

SetID sets the value of ID.

func (*AddProject) SetIdentifier

func (s *AddProject) SetIdentifier(val []AddProjectIdentifierItem)

SetIdentifier sets the value of Identifier.

func (*AddProject) SetIsFundedBy

func (s *AddProject) SetIsFundedBy(val OptAddProjectIsFundedBy)

SetIsFundedBy sets the value of IsFundedBy.

func (*AddProject) SetModified

func (s *AddProject) SetModified(val OptDateTime)

SetModified sets the value of Modified.

func (*AddProject) SetName

func (s *AddProject) SetName(val []AddProjectNameItem)

SetName sets the value of Name.

func (*AddProject) SetType

func (s *AddProject) SetType(val string)

SetType sets the value of Type.

func (*AddProject) UnmarshalJSON

func (s *AddProject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*AddProject) Validate

func (s *AddProject) Validate() error

type AddProjectDescriptionItem

type AddProjectDescriptionItem struct {
	Language string `json:"language"`
	Value    string `json:"value"`
}

func (*AddProjectDescriptionItem) Decode

func (s *AddProjectDescriptionItem) Decode(d *jx.Decoder) error

Decode decodes AddProjectDescriptionItem from json.

func (*AddProjectDescriptionItem) Encode

func (s *AddProjectDescriptionItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddProjectDescriptionItem) GetLanguage

func (s *AddProjectDescriptionItem) GetLanguage() string

GetLanguage returns the value of Language.

func (*AddProjectDescriptionItem) GetValue

func (s *AddProjectDescriptionItem) GetValue() string

GetValue returns the value of Value.

func (*AddProjectDescriptionItem) MarshalJSON

func (s *AddProjectDescriptionItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProjectDescriptionItem) SetLanguage

func (s *AddProjectDescriptionItem) SetLanguage(val string)

SetLanguage sets the value of Language.

func (*AddProjectDescriptionItem) SetValue

func (s *AddProjectDescriptionItem) SetValue(val string)

SetValue sets the value of Value.

func (*AddProjectDescriptionItem) UnmarshalJSON

func (s *AddProjectDescriptionItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AddProjectIdentifierItem

type AddProjectIdentifierItem struct {
	Type       string `json:"type"`
	PropertyID string `json:"propertyID"`
	Value      string `json:"value"`
}

func (*AddProjectIdentifierItem) Decode

func (s *AddProjectIdentifierItem) Decode(d *jx.Decoder) error

Decode decodes AddProjectIdentifierItem from json.

func (*AddProjectIdentifierItem) Encode

func (s *AddProjectIdentifierItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddProjectIdentifierItem) GetPropertyID

func (s *AddProjectIdentifierItem) GetPropertyID() string

GetPropertyID returns the value of PropertyID.

func (*AddProjectIdentifierItem) GetType

func (s *AddProjectIdentifierItem) GetType() string

GetType returns the value of Type.

func (*AddProjectIdentifierItem) GetValue

func (s *AddProjectIdentifierItem) GetValue() string

GetValue returns the value of Value.

func (*AddProjectIdentifierItem) MarshalJSON

func (s *AddProjectIdentifierItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProjectIdentifierItem) SetPropertyID

func (s *AddProjectIdentifierItem) SetPropertyID(val string)

SetPropertyID sets the value of PropertyID.

func (*AddProjectIdentifierItem) SetType

func (s *AddProjectIdentifierItem) SetType(val string)

SetType sets the value of Type.

func (*AddProjectIdentifierItem) SetValue

func (s *AddProjectIdentifierItem) SetValue(val string)

SetValue sets the value of Value.

func (*AddProjectIdentifierItem) UnmarshalJSON

func (s *AddProjectIdentifierItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AddProjectIsFundedBy

type AddProjectIsFundedBy struct {
	Type          string                                `json:"type"`
	HasCallNumber OptString                             `json:"hasCallNumber"`
	IsAwardedBy   OptNilAddProjectIsFundedByIsAwardedBy `json:"isAwardedBy"`
}

func (*AddProjectIsFundedBy) Decode

func (s *AddProjectIsFundedBy) Decode(d *jx.Decoder) error

Decode decodes AddProjectIsFundedBy from json.

func (*AddProjectIsFundedBy) Encode

func (s *AddProjectIsFundedBy) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddProjectIsFundedBy) GetHasCallNumber

func (s *AddProjectIsFundedBy) GetHasCallNumber() OptString

GetHasCallNumber returns the value of HasCallNumber.

func (*AddProjectIsFundedBy) GetIsAwardedBy

GetIsAwardedBy returns the value of IsAwardedBy.

func (*AddProjectIsFundedBy) GetType

func (s *AddProjectIsFundedBy) GetType() string

GetType returns the value of Type.

func (*AddProjectIsFundedBy) MarshalJSON

func (s *AddProjectIsFundedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProjectIsFundedBy) SetHasCallNumber

func (s *AddProjectIsFundedBy) SetHasCallNumber(val OptString)

SetHasCallNumber sets the value of HasCallNumber.

func (*AddProjectIsFundedBy) SetIsAwardedBy

SetIsAwardedBy sets the value of IsAwardedBy.

func (*AddProjectIsFundedBy) SetType

func (s *AddProjectIsFundedBy) SetType(val string)

SetType sets the value of Type.

func (*AddProjectIsFundedBy) UnmarshalJSON

func (s *AddProjectIsFundedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AddProjectIsFundedByIsAwardedBy

type AddProjectIsFundedByIsAwardedBy struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

func (*AddProjectIsFundedByIsAwardedBy) Decode

Decode decodes AddProjectIsFundedByIsAwardedBy from json.

func (*AddProjectIsFundedByIsAwardedBy) Encode

Encode implements json.Marshaler.

func (*AddProjectIsFundedByIsAwardedBy) GetName

GetName returns the value of Name.

func (*AddProjectIsFundedByIsAwardedBy) GetType

GetType returns the value of Type.

func (*AddProjectIsFundedByIsAwardedBy) MarshalJSON

func (s *AddProjectIsFundedByIsAwardedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProjectIsFundedByIsAwardedBy) SetName

func (s *AddProjectIsFundedByIsAwardedBy) SetName(val string)

SetName sets the value of Name.

func (*AddProjectIsFundedByIsAwardedBy) SetType

func (s *AddProjectIsFundedByIsAwardedBy) SetType(val string)

SetType sets the value of Type.

func (*AddProjectIsFundedByIsAwardedBy) UnmarshalJSON

func (s *AddProjectIsFundedByIsAwardedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AddProjectNameItem

type AddProjectNameItem struct {
	Language string `json:"language"`
	Value    string `json:"value"`
}

func (*AddProjectNameItem) Decode

func (s *AddProjectNameItem) Decode(d *jx.Decoder) error

Decode decodes AddProjectNameItem from json.

func (*AddProjectNameItem) Encode

func (s *AddProjectNameItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*AddProjectNameItem) GetLanguage

func (s *AddProjectNameItem) GetLanguage() string

GetLanguage returns the value of Language.

func (*AddProjectNameItem) GetValue

func (s *AddProjectNameItem) GetValue() string

GetValue returns the value of Value.

func (*AddProjectNameItem) MarshalJSON

func (s *AddProjectNameItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AddProjectNameItem) SetLanguage

func (s *AddProjectNameItem) SetLanguage(val string)

SetLanguage sets the value of Language.

func (*AddProjectNameItem) SetValue

func (s *AddProjectNameItem) SetValue(val string)

SetValue sets the value of Value.

func (*AddProjectNameItem) UnmarshalJSON

func (s *AddProjectNameItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type AddProjectOK

type AddProjectOK struct{}

AddProjectOK is response for AddProject operation.

type ApiKey

type ApiKey struct {
	APIKey string
}

func (*ApiKey) GetAPIKey

func (s *ApiKey) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*ApiKey) SetAPIKey

func (s *ApiKey) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) AddProject

func (c *Client) AddProject(ctx context.Context, request *AddProject) error

AddProject invokes addProject operation.

Add a single project.

POST /add-project

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, request *DeleteProjectRequest) error

DeleteProject invokes deleteProject operation.

Delete a project.

POST /delete-project

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, request *GetProjectRequest) (GetProjectRes, error)

GetProject invokes getProject operation.

Get a project.

POST /get-project

func (*Client) SuggestProjects

func (c *Client) SuggestProjects(ctx context.Context, request *SuggestProjectsRequest) (*SuggestProjectsResponse, error)

SuggestProjects invokes suggestProjects operation.

Search in projects.

POST /suggest-projects

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type DeleteProjectOK

type DeleteProjectOK struct{}

DeleteProjectOK is response for DeleteProject operation.

type DeleteProjectRequest

type DeleteProjectRequest struct {
	ID string `json:"id"`
}

Ref: #/components/schemas/DeleteProjectRequest

func (*DeleteProjectRequest) Decode

func (s *DeleteProjectRequest) Decode(d *jx.Decoder) error

Decode decodes DeleteProjectRequest from json.

func (*DeleteProjectRequest) Encode

func (s *DeleteProjectRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DeleteProjectRequest) GetID

func (s *DeleteProjectRequest) GetID() string

GetID returns the value of ID.

func (*DeleteProjectRequest) MarshalJSON

func (s *DeleteProjectRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DeleteProjectRequest) SetID

func (s *DeleteProjectRequest) SetID(val string)

SetID sets the value of ID.

func (*DeleteProjectRequest) UnmarshalJSON

func (s *DeleteProjectRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DeleteProjectRequest) Validate

func (s *DeleteProjectRequest) Validate() error

type Error

type Error struct {
	Code    int64  `json:"code"`
	Message string `json:"message"`
}

Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetCode

func (s *Error) GetCode() int64

GetCode returns the value of Code.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val int64)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

ErrorStatusCode wraps Error with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() Error

GetResponse returns the value of Response.

func (*ErrorStatusCode) GetStatusCode

func (s *ErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*ErrorStatusCode) SetResponse

func (s *ErrorStatusCode) SetResponse(val Error)

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type GetProject

type GetProject struct {
	ID              string                      `json:"id"`
	Created         time.Time                   `json:"created"`
	Modified        time.Time                   `json:"modified"`
	Type            string                      `json:"type"`
	Identifier      []GetProjectIdentifierItem  `json:"identifier"`
	IsFundedBy      OptGetProjectIsFundedBy     `json:"isFundedBy"`
	HasAcronym      []string                    `json:"hasAcronym"`
	Name            []GetProjectNameItem        `json:"name"`
	Description     []GetProjectDescriptionItem `json:"description"`
	FoundingDate    OptString                   `json:"foundingDate"`
	DissolutionDate OptString                   `json:"dissolutionDate"`
}

Merged schema. Ref: #/components/schemas/GetProject

func (*GetProject) Decode

func (s *GetProject) Decode(d *jx.Decoder) error

Decode decodes GetProject from json.

func (*GetProject) Encode

func (s *GetProject) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProject) GetCreated

func (s *GetProject) GetCreated() time.Time

GetCreated returns the value of Created.

func (*GetProject) GetDescription

func (s *GetProject) GetDescription() []GetProjectDescriptionItem

GetDescription returns the value of Description.

func (*GetProject) GetDissolutionDate

func (s *GetProject) GetDissolutionDate() OptString

GetDissolutionDate returns the value of DissolutionDate.

func (*GetProject) GetFoundingDate

func (s *GetProject) GetFoundingDate() OptString

GetFoundingDate returns the value of FoundingDate.

func (*GetProject) GetHasAcronym

func (s *GetProject) GetHasAcronym() []string

GetHasAcronym returns the value of HasAcronym.

func (*GetProject) GetID

func (s *GetProject) GetID() string

GetID returns the value of ID.

func (*GetProject) GetIdentifier

func (s *GetProject) GetIdentifier() []GetProjectIdentifierItem

GetIdentifier returns the value of Identifier.

func (*GetProject) GetIsFundedBy

func (s *GetProject) GetIsFundedBy() OptGetProjectIsFundedBy

GetIsFundedBy returns the value of IsFundedBy.

func (*GetProject) GetModified

func (s *GetProject) GetModified() time.Time

GetModified returns the value of Modified.

func (*GetProject) GetName

func (s *GetProject) GetName() []GetProjectNameItem

GetName returns the value of Name.

func (*GetProject) GetType

func (s *GetProject) GetType() string

GetType returns the value of Type.

func (*GetProject) MarshalJSON

func (s *GetProject) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProject) SetCreated

func (s *GetProject) SetCreated(val time.Time)

SetCreated sets the value of Created.

func (*GetProject) SetDescription

func (s *GetProject) SetDescription(val []GetProjectDescriptionItem)

SetDescription sets the value of Description.

func (*GetProject) SetDissolutionDate

func (s *GetProject) SetDissolutionDate(val OptString)

SetDissolutionDate sets the value of DissolutionDate.

func (*GetProject) SetFoundingDate

func (s *GetProject) SetFoundingDate(val OptString)

SetFoundingDate sets the value of FoundingDate.

func (*GetProject) SetHasAcronym

func (s *GetProject) SetHasAcronym(val []string)

SetHasAcronym sets the value of HasAcronym.

func (*GetProject) SetID

func (s *GetProject) SetID(val string)

SetID sets the value of ID.

func (*GetProject) SetIdentifier

func (s *GetProject) SetIdentifier(val []GetProjectIdentifierItem)

SetIdentifier sets the value of Identifier.

func (*GetProject) SetIsFundedBy

func (s *GetProject) SetIsFundedBy(val OptGetProjectIsFundedBy)

SetIsFundedBy sets the value of IsFundedBy.

func (*GetProject) SetModified

func (s *GetProject) SetModified(val time.Time)

SetModified sets the value of Modified.

func (*GetProject) SetName

func (s *GetProject) SetName(val []GetProjectNameItem)

SetName sets the value of Name.

func (*GetProject) SetType

func (s *GetProject) SetType(val string)

SetType sets the value of Type.

func (*GetProject) UnmarshalJSON

func (s *GetProject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetProject) Validate

func (s *GetProject) Validate() error

type GetProjectDescriptionItem

type GetProjectDescriptionItem struct {
	Language string `json:"language"`
	Value    string `json:"value"`
}

func (*GetProjectDescriptionItem) Decode

func (s *GetProjectDescriptionItem) Decode(d *jx.Decoder) error

Decode decodes GetProjectDescriptionItem from json.

func (*GetProjectDescriptionItem) Encode

func (s *GetProjectDescriptionItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProjectDescriptionItem) GetLanguage

func (s *GetProjectDescriptionItem) GetLanguage() string

GetLanguage returns the value of Language.

func (*GetProjectDescriptionItem) GetValue

func (s *GetProjectDescriptionItem) GetValue() string

GetValue returns the value of Value.

func (*GetProjectDescriptionItem) MarshalJSON

func (s *GetProjectDescriptionItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectDescriptionItem) SetLanguage

func (s *GetProjectDescriptionItem) SetLanguage(val string)

SetLanguage sets the value of Language.

func (*GetProjectDescriptionItem) SetValue

func (s *GetProjectDescriptionItem) SetValue(val string)

SetValue sets the value of Value.

func (*GetProjectDescriptionItem) UnmarshalJSON

func (s *GetProjectDescriptionItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetProjectIdentifierItem

type GetProjectIdentifierItem struct {
	Type       string `json:"type"`
	PropertyID string `json:"propertyID"`
	Value      string `json:"value"`
}

func (*GetProjectIdentifierItem) Decode

func (s *GetProjectIdentifierItem) Decode(d *jx.Decoder) error

Decode decodes GetProjectIdentifierItem from json.

func (*GetProjectIdentifierItem) Encode

func (s *GetProjectIdentifierItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProjectIdentifierItem) GetPropertyID

func (s *GetProjectIdentifierItem) GetPropertyID() string

GetPropertyID returns the value of PropertyID.

func (*GetProjectIdentifierItem) GetType

func (s *GetProjectIdentifierItem) GetType() string

GetType returns the value of Type.

func (*GetProjectIdentifierItem) GetValue

func (s *GetProjectIdentifierItem) GetValue() string

GetValue returns the value of Value.

func (*GetProjectIdentifierItem) MarshalJSON

func (s *GetProjectIdentifierItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectIdentifierItem) SetPropertyID

func (s *GetProjectIdentifierItem) SetPropertyID(val string)

SetPropertyID sets the value of PropertyID.

func (*GetProjectIdentifierItem) SetType

func (s *GetProjectIdentifierItem) SetType(val string)

SetType sets the value of Type.

func (*GetProjectIdentifierItem) SetValue

func (s *GetProjectIdentifierItem) SetValue(val string)

SetValue sets the value of Value.

func (*GetProjectIdentifierItem) UnmarshalJSON

func (s *GetProjectIdentifierItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetProjectIsFundedBy

type GetProjectIsFundedBy struct {
	Type          string                                `json:"type"`
	HasCallNumber OptString                             `json:"hasCallNumber"`
	IsAwardedBy   OptNilGetProjectIsFundedByIsAwardedBy `json:"isAwardedBy"`
}

func (*GetProjectIsFundedBy) Decode

func (s *GetProjectIsFundedBy) Decode(d *jx.Decoder) error

Decode decodes GetProjectIsFundedBy from json.

func (*GetProjectIsFundedBy) Encode

func (s *GetProjectIsFundedBy) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProjectIsFundedBy) GetHasCallNumber

func (s *GetProjectIsFundedBy) GetHasCallNumber() OptString

GetHasCallNumber returns the value of HasCallNumber.

func (*GetProjectIsFundedBy) GetIsAwardedBy

GetIsAwardedBy returns the value of IsAwardedBy.

func (*GetProjectIsFundedBy) GetType

func (s *GetProjectIsFundedBy) GetType() string

GetType returns the value of Type.

func (*GetProjectIsFundedBy) MarshalJSON

func (s *GetProjectIsFundedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectIsFundedBy) SetHasCallNumber

func (s *GetProjectIsFundedBy) SetHasCallNumber(val OptString)

SetHasCallNumber sets the value of HasCallNumber.

func (*GetProjectIsFundedBy) SetIsAwardedBy

SetIsAwardedBy sets the value of IsAwardedBy.

func (*GetProjectIsFundedBy) SetType

func (s *GetProjectIsFundedBy) SetType(val string)

SetType sets the value of Type.

func (*GetProjectIsFundedBy) UnmarshalJSON

func (s *GetProjectIsFundedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetProjectIsFundedByIsAwardedBy

type GetProjectIsFundedByIsAwardedBy struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

func (*GetProjectIsFundedByIsAwardedBy) Decode

Decode decodes GetProjectIsFundedByIsAwardedBy from json.

func (*GetProjectIsFundedByIsAwardedBy) Encode

Encode implements json.Marshaler.

func (*GetProjectIsFundedByIsAwardedBy) GetName

GetName returns the value of Name.

func (*GetProjectIsFundedByIsAwardedBy) GetType

GetType returns the value of Type.

func (*GetProjectIsFundedByIsAwardedBy) MarshalJSON

func (s *GetProjectIsFundedByIsAwardedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectIsFundedByIsAwardedBy) SetName

func (s *GetProjectIsFundedByIsAwardedBy) SetName(val string)

SetName sets the value of Name.

func (*GetProjectIsFundedByIsAwardedBy) SetType

func (s *GetProjectIsFundedByIsAwardedBy) SetType(val string)

SetType sets the value of Type.

func (*GetProjectIsFundedByIsAwardedBy) UnmarshalJSON

func (s *GetProjectIsFundedByIsAwardedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetProjectNameItem

type GetProjectNameItem struct {
	Language string `json:"language"`
	Value    string `json:"value"`
}

func (*GetProjectNameItem) Decode

func (s *GetProjectNameItem) Decode(d *jx.Decoder) error

Decode decodes GetProjectNameItem from json.

func (*GetProjectNameItem) Encode

func (s *GetProjectNameItem) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProjectNameItem) GetLanguage

func (s *GetProjectNameItem) GetLanguage() string

GetLanguage returns the value of Language.

func (*GetProjectNameItem) GetValue

func (s *GetProjectNameItem) GetValue() string

GetValue returns the value of Value.

func (*GetProjectNameItem) MarshalJSON

func (s *GetProjectNameItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectNameItem) SetLanguage

func (s *GetProjectNameItem) SetLanguage(val string)

SetLanguage sets the value of Language.

func (*GetProjectNameItem) SetValue

func (s *GetProjectNameItem) SetValue(val string)

SetValue sets the value of Value.

func (*GetProjectNameItem) UnmarshalJSON

func (s *GetProjectNameItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GetProjectRequest

type GetProjectRequest struct {
	ID string `json:"id"`
}

Ref: #/components/schemas/GetProjectRequest

func (*GetProjectRequest) Decode

func (s *GetProjectRequest) Decode(d *jx.Decoder) error

Decode decodes GetProjectRequest from json.

func (*GetProjectRequest) Encode

func (s *GetProjectRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GetProjectRequest) GetID

func (s *GetProjectRequest) GetID() string

GetID returns the value of ID.

func (*GetProjectRequest) MarshalJSON

func (s *GetProjectRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetProjectRequest) SetID

func (s *GetProjectRequest) SetID(val string)

SetID sets the value of ID.

func (*GetProjectRequest) UnmarshalJSON

func (s *GetProjectRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetProjectRequest) Validate

func (s *GetProjectRequest) Validate() error

type GetProjectRes

type GetProjectRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// AddProject implements addProject operation.
	//
	// Add a single project.
	//
	// POST /add-project
	AddProject(ctx context.Context, req *AddProject) error
	// DeleteProject implements deleteProject operation.
	//
	// Delete a project.
	//
	// POST /delete-project
	DeleteProject(ctx context.Context, req *DeleteProjectRequest) error
	// GetProject implements getProject operation.
	//
	// Get a project.
	//
	// POST /get-project
	GetProject(ctx context.Context, req *GetProjectRequest) (GetProjectRes, error)
	// SuggestProjects implements suggestProjects operation.
	//
	// Search in projects.
	//
	// POST /suggest-projects
	SuggestProjects(ctx context.Context, req *SuggestProjectsRequest) (*SuggestProjectsResponse, error)
	// NewError creates *ErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *ErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// AddProject invokes addProject operation.
	//
	// Add a single project.
	//
	// POST /add-project
	AddProject(ctx context.Context, request *AddProject) error
	// DeleteProject invokes deleteProject operation.
	//
	// Delete a project.
	//
	// POST /delete-project
	DeleteProject(ctx context.Context, request *DeleteProjectRequest) error
	// GetProject invokes getProject operation.
	//
	// Get a project.
	//
	// POST /get-project
	GetProject(ctx context.Context, request *GetProjectRequest) (GetProjectRes, error)
	// SuggestProjects invokes suggestProjects operation.
	//
	// Search in projects.
	//
	// POST /suggest-projects
	SuggestProjects(ctx context.Context, request *SuggestProjectsRequest) (*SuggestProjectsResponse, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptAddProjectIsFundedBy

type OptAddProjectIsFundedBy struct {
	Value AddProjectIsFundedBy
	Set   bool
}

OptAddProjectIsFundedBy is optional AddProjectIsFundedBy.

func NewOptAddProjectIsFundedBy

func NewOptAddProjectIsFundedBy(v AddProjectIsFundedBy) OptAddProjectIsFundedBy

NewOptAddProjectIsFundedBy returns new OptAddProjectIsFundedBy with value set to v.

func (*OptAddProjectIsFundedBy) Decode

func (o *OptAddProjectIsFundedBy) Decode(d *jx.Decoder) error

Decode decodes AddProjectIsFundedBy from json.

func (OptAddProjectIsFundedBy) Encode

func (o OptAddProjectIsFundedBy) Encode(e *jx.Encoder)

Encode encodes AddProjectIsFundedBy as json.

func (OptAddProjectIsFundedBy) Get

Get returns value and boolean that denotes whether value was set.

func (OptAddProjectIsFundedBy) IsSet

func (o OptAddProjectIsFundedBy) IsSet() bool

IsSet returns true if OptAddProjectIsFundedBy was set.

func (OptAddProjectIsFundedBy) MarshalJSON

func (s OptAddProjectIsFundedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptAddProjectIsFundedBy) Or

Or returns value if set, or given parameter if does not.

func (*OptAddProjectIsFundedBy) Reset

func (o *OptAddProjectIsFundedBy) Reset()

Reset unsets value.

func (*OptAddProjectIsFundedBy) SetTo

SetTo sets value to v.

func (*OptAddProjectIsFundedBy) UnmarshalJSON

func (s *OptAddProjectIsFundedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptDateTime

type OptDateTime struct {
	Value time.Time
	Set   bool
}

OptDateTime is optional time.Time.

func NewOptDateTime

func NewOptDateTime(v time.Time) OptDateTime

NewOptDateTime returns new OptDateTime with value set to v.

func (*OptDateTime) Decode

func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error

Decode decodes time.Time from json.

func (OptDateTime) Encode

func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))

Encode encodes time.Time as json.

func (OptDateTime) Get

func (o OptDateTime) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDateTime) IsSet

func (o OptDateTime) IsSet() bool

IsSet returns true if OptDateTime was set.

func (OptDateTime) MarshalJSON

func (s OptDateTime) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptDateTime) Or

func (o OptDateTime) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptDateTime) Reset

func (o *OptDateTime) Reset()

Reset unsets value.

func (*OptDateTime) SetTo

func (o *OptDateTime) SetTo(v time.Time)

SetTo sets value to v.

func (*OptDateTime) UnmarshalJSON

func (s *OptDateTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptGetProjectIsFundedBy

type OptGetProjectIsFundedBy struct {
	Value GetProjectIsFundedBy
	Set   bool
}

OptGetProjectIsFundedBy is optional GetProjectIsFundedBy.

func NewOptGetProjectIsFundedBy

func NewOptGetProjectIsFundedBy(v GetProjectIsFundedBy) OptGetProjectIsFundedBy

NewOptGetProjectIsFundedBy returns new OptGetProjectIsFundedBy with value set to v.

func (*OptGetProjectIsFundedBy) Decode

func (o *OptGetProjectIsFundedBy) Decode(d *jx.Decoder) error

Decode decodes GetProjectIsFundedBy from json.

func (OptGetProjectIsFundedBy) Encode

func (o OptGetProjectIsFundedBy) Encode(e *jx.Encoder)

Encode encodes GetProjectIsFundedBy as json.

func (OptGetProjectIsFundedBy) Get

Get returns value and boolean that denotes whether value was set.

func (OptGetProjectIsFundedBy) IsSet

func (o OptGetProjectIsFundedBy) IsSet() bool

IsSet returns true if OptGetProjectIsFundedBy was set.

func (OptGetProjectIsFundedBy) MarshalJSON

func (s OptGetProjectIsFundedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptGetProjectIsFundedBy) Or

Or returns value if set, or given parameter if does not.

func (*OptGetProjectIsFundedBy) Reset

func (o *OptGetProjectIsFundedBy) Reset()

Reset unsets value.

func (*OptGetProjectIsFundedBy) SetTo

SetTo sets value to v.

func (*OptGetProjectIsFundedBy) UnmarshalJSON

func (s *OptGetProjectIsFundedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilAddProjectIsFundedByIsAwardedBy

type OptNilAddProjectIsFundedByIsAwardedBy struct {
	Value AddProjectIsFundedByIsAwardedBy
	Set   bool
	Null  bool
}

OptNilAddProjectIsFundedByIsAwardedBy is optional nullable AddProjectIsFundedByIsAwardedBy.

func NewOptNilAddProjectIsFundedByIsAwardedBy

func NewOptNilAddProjectIsFundedByIsAwardedBy(v AddProjectIsFundedByIsAwardedBy) OptNilAddProjectIsFundedByIsAwardedBy

NewOptNilAddProjectIsFundedByIsAwardedBy returns new OptNilAddProjectIsFundedByIsAwardedBy with value set to v.

func (*OptNilAddProjectIsFundedByIsAwardedBy) Decode

Decode decodes AddProjectIsFundedByIsAwardedBy from json.

func (OptNilAddProjectIsFundedByIsAwardedBy) Encode

Encode encodes AddProjectIsFundedByIsAwardedBy as json.

func (OptNilAddProjectIsFundedByIsAwardedBy) Get

Get returns value and boolean that denotes whether value was set.

func (OptNilAddProjectIsFundedByIsAwardedBy) IsNull

IsSet returns true if value is Null.

func (OptNilAddProjectIsFundedByIsAwardedBy) IsSet

IsSet returns true if OptNilAddProjectIsFundedByIsAwardedBy was set.

func (OptNilAddProjectIsFundedByIsAwardedBy) MarshalJSON

func (s OptNilAddProjectIsFundedByIsAwardedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilAddProjectIsFundedByIsAwardedBy) Or

Or returns value if set, or given parameter if does not.

func (*OptNilAddProjectIsFundedByIsAwardedBy) Reset

Reset unsets value.

func (*OptNilAddProjectIsFundedByIsAwardedBy) SetTo

SetTo sets value to v.

func (*OptNilAddProjectIsFundedByIsAwardedBy) SetToNull

SetNull sets value to null.

func (*OptNilAddProjectIsFundedByIsAwardedBy) UnmarshalJSON

func (s *OptNilAddProjectIsFundedByIsAwardedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilGetProjectIsFundedByIsAwardedBy

type OptNilGetProjectIsFundedByIsAwardedBy struct {
	Value GetProjectIsFundedByIsAwardedBy
	Set   bool
	Null  bool
}

OptNilGetProjectIsFundedByIsAwardedBy is optional nullable GetProjectIsFundedByIsAwardedBy.

func NewOptNilGetProjectIsFundedByIsAwardedBy

func NewOptNilGetProjectIsFundedByIsAwardedBy(v GetProjectIsFundedByIsAwardedBy) OptNilGetProjectIsFundedByIsAwardedBy

NewOptNilGetProjectIsFundedByIsAwardedBy returns new OptNilGetProjectIsFundedByIsAwardedBy with value set to v.

func (*OptNilGetProjectIsFundedByIsAwardedBy) Decode

Decode decodes GetProjectIsFundedByIsAwardedBy from json.

func (OptNilGetProjectIsFundedByIsAwardedBy) Encode

Encode encodes GetProjectIsFundedByIsAwardedBy as json.

func (OptNilGetProjectIsFundedByIsAwardedBy) Get

Get returns value and boolean that denotes whether value was set.

func (OptNilGetProjectIsFundedByIsAwardedBy) IsNull

IsSet returns true if value is Null.

func (OptNilGetProjectIsFundedByIsAwardedBy) IsSet

IsSet returns true if OptNilGetProjectIsFundedByIsAwardedBy was set.

func (OptNilGetProjectIsFundedByIsAwardedBy) MarshalJSON

func (s OptNilGetProjectIsFundedByIsAwardedBy) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilGetProjectIsFundedByIsAwardedBy) Or

Or returns value if set, or given parameter if does not.

func (*OptNilGetProjectIsFundedByIsAwardedBy) Reset

Reset unsets value.

func (*OptNilGetProjectIsFundedByIsAwardedBy) SetTo

SetTo sets value to v.

func (*OptNilGetProjectIsFundedByIsAwardedBy) SetToNull

SetNull sets value to null.

func (*OptNilGetProjectIsFundedByIsAwardedBy) UnmarshalJSON

func (s *OptNilGetProjectIsFundedByIsAwardedBy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleApiKey handles apiKey security.
	HandleApiKey(ctx context.Context, operationName string, t ApiKey) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// ApiKey provides apiKey security value.
	ApiKey(ctx context.Context, operationName string) (ApiKey, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type Service

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

func NewService

func NewService(repo *repositories.Repo) *Service

func (*Service) AddProject

func (s *Service) AddProject(ctx context.Context, req *AddProject) error

func (*Service) DeleteProject

func (s *Service) DeleteProject(ctx context.Context, req *DeleteProjectRequest) error

func (*Service) GetProject

func (s *Service) GetProject(ctx context.Context, req *GetProjectRequest) (GetProjectRes, error)

func (*Service) NewError

func (s *Service) NewError(ctx context.Context, err error) *ErrorStatusCode

func (*Service) SuggestProjects

func (s *Service) SuggestProjects(ctx context.Context, req *SuggestProjectsRequest) (*SuggestProjectsResponse, error)

type SuggestProjectsRequest

type SuggestProjectsRequest struct {
	Query string `json:"query"`
}

Ref: #/components/schemas/SuggestProjectsRequest

func (*SuggestProjectsRequest) Decode

func (s *SuggestProjectsRequest) Decode(d *jx.Decoder) error

Decode decodes SuggestProjectsRequest from json.

func (*SuggestProjectsRequest) Encode

func (s *SuggestProjectsRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SuggestProjectsRequest) GetQuery

func (s *SuggestProjectsRequest) GetQuery() string

GetQuery returns the value of Query.

func (*SuggestProjectsRequest) MarshalJSON

func (s *SuggestProjectsRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SuggestProjectsRequest) SetQuery

func (s *SuggestProjectsRequest) SetQuery(val string)

SetQuery sets the value of Query.

func (*SuggestProjectsRequest) UnmarshalJSON

func (s *SuggestProjectsRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SuggestProjectsRequest) Validate

func (s *SuggestProjectsRequest) Validate() error

type SuggestProjectsResponse

type SuggestProjectsResponse struct {
	Cursor OptString    `json:"cursor"`
	Data   []GetProject `json:"data"`
}

Ref: #/components/schemas/SuggestProjectsResponse

func (*SuggestProjectsResponse) Decode

func (s *SuggestProjectsResponse) Decode(d *jx.Decoder) error

Decode decodes SuggestProjectsResponse from json.

func (*SuggestProjectsResponse) Encode

func (s *SuggestProjectsResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SuggestProjectsResponse) GetCursor

func (s *SuggestProjectsResponse) GetCursor() OptString

GetCursor returns the value of Cursor.

func (*SuggestProjectsResponse) GetData

func (s *SuggestProjectsResponse) GetData() []GetProject

GetData returns the value of Data.

func (*SuggestProjectsResponse) MarshalJSON

func (s *SuggestProjectsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SuggestProjectsResponse) SetCursor

func (s *SuggestProjectsResponse) SetCursor(val OptString)

SetCursor sets the value of Cursor.

func (*SuggestProjectsResponse) SetData

func (s *SuggestProjectsResponse) SetData(val []GetProject)

SetData sets the value of Data.

func (*SuggestProjectsResponse) UnmarshalJSON

func (s *SuggestProjectsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SuggestProjectsResponse) Validate

func (s *SuggestProjectsResponse) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) AddProject

func (UnimplementedHandler) AddProject(ctx context.Context, req *AddProject) error

AddProject implements addProject operation.

Add a single project.

POST /add-project

func (UnimplementedHandler) DeleteProject

DeleteProject implements deleteProject operation.

Delete a project.

POST /delete-project

func (UnimplementedHandler) GetProject

GetProject implements getProject operation.

Get a project.

POST /get-project

func (UnimplementedHandler) NewError

func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) SuggestProjects

SuggestProjects implements suggestProjects operation.

Search in projects.

POST /suggest-projects

Jump to

Keyboard shortcuts

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