jsonapi

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_apis_jsonapi_jsonapi_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrorCaller

type ErrorCaller struct {
	File     string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	Line     int32  `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"`
	Function string `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorCaller) Descriptor deprecated

func (*ErrorCaller) Descriptor() ([]byte, []int)

Deprecated: Use ErrorCaller.ProtoReflect.Descriptor instead.

func (*ErrorCaller) GetFile

func (x *ErrorCaller) GetFile() string

func (*ErrorCaller) GetFunction

func (x *ErrorCaller) GetFunction() string

func (*ErrorCaller) GetLine

func (x *ErrorCaller) GetLine() int32

func (*ErrorCaller) ProtoMessage

func (*ErrorCaller) ProtoMessage()

func (*ErrorCaller) ProtoReflect

func (x *ErrorCaller) ProtoReflect() protoreflect.Message

func (*ErrorCaller) Reset

func (x *ErrorCaller) Reset()

func (*ErrorCaller) String

func (x *ErrorCaller) String() string

type ErrorObject

type ErrorObject struct {

	// a unique identifier for this particular occurrence of the problem.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// a links object containing references to the source of the error.
	Links *Links `protobuf:"bytes,2,opt,name=links,proto3,oneof" json:"links,omitempty"`
	// the HTTP status code applicable to this problem, expressed as a string value.
	Status uint32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// an application-specific error code, expressed as a string value.
	Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"`
	// a short, human-readable summary of the problem
	Title string `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
	// a human-readable explanation specific to this occurrence of the problem. Like title.
	Detail string `protobuf:"bytes,6,opt,name=detail,proto3" json:"detail,omitempty"`
	// an object containing references to the source of the error.
	Source *ErrorObjectSource `protobuf:"bytes,7,opt,name=source,proto3,oneof" json:"source,omitempty"`
	// a meta object containing non-standard meta-information about the error.
	Meta map[string]*anypb.Any `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ErrorObject) Descriptor deprecated

func (*ErrorObject) Descriptor() ([]byte, []int)

Deprecated: Use ErrorObject.ProtoReflect.Descriptor instead.

func (*ErrorObject) GetCode

func (x *ErrorObject) GetCode() string

func (*ErrorObject) GetDetail

func (x *ErrorObject) GetDetail() string

func (*ErrorObject) GetId

func (x *ErrorObject) GetId() string
func (x *ErrorObject) GetLinks() *Links

func (*ErrorObject) GetMeta

func (x *ErrorObject) GetMeta() map[string]*anypb.Any

func (*ErrorObject) GetSource

func (x *ErrorObject) GetSource() *ErrorObjectSource

func (*ErrorObject) GetStatus

func (x *ErrorObject) GetStatus() uint32

func (*ErrorObject) GetTitle

func (x *ErrorObject) GetTitle() string

func (*ErrorObject) ProtoMessage

func (*ErrorObject) ProtoMessage()

func (*ErrorObject) ProtoReflect

func (x *ErrorObject) ProtoReflect() protoreflect.Message

func (*ErrorObject) Reset

func (x *ErrorObject) Reset()

func (*ErrorObject) String

func (x *ErrorObject) String() string

type ErrorObjectSource

type ErrorObjectSource struct {

	// a JSON Pointer [RFC6901] to the value in the request document that caused the error
	// [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute].
	Pointer string `protobuf:"bytes,1,opt,name=pointer,proto3" json:"pointer,omitempty"`
	// a string indicating which URI query parameter caused the error.
	Parameter string `protobuf:"bytes,2,opt,name=parameter,proto3" json:"parameter,omitempty"`
	// a string indicating the name of a single request header which caused the error.
	Header string `protobuf:"bytes,3,opt,name=header,proto3" json:"header,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorObjectSource) Descriptor deprecated

func (*ErrorObjectSource) Descriptor() ([]byte, []int)

Deprecated: Use ErrorObjectSource.ProtoReflect.Descriptor instead.

func (*ErrorObjectSource) GetHeader

func (x *ErrorObjectSource) GetHeader() string

func (*ErrorObjectSource) GetParameter

func (x *ErrorObjectSource) GetParameter() string

func (*ErrorObjectSource) GetPointer

func (x *ErrorObjectSource) GetPointer() string

func (*ErrorObjectSource) ProtoMessage

func (*ErrorObjectSource) ProtoMessage()

func (*ErrorObjectSource) ProtoReflect

func (x *ErrorObjectSource) ProtoReflect() protoreflect.Message

func (*ErrorObjectSource) Reset

func (x *ErrorObjectSource) Reset()

func (*ErrorObjectSource) String

func (x *ErrorObjectSource) String() string
type Links struct {

	// a string whose value is a URI-reference [RFC3986 Section 4.1] pointing to the link’s target.
	Href string `protobuf:"bytes,1,opt,name=href,proto3" json:"href,omitempty"`
	// a string indicating the link’s relation type.
	Rel *string `protobuf:"bytes,2,opt,name=rel,proto3,oneof" json:"rel,omitempty"`
	// a link to a description document (e.g. OpenAPI or JSON Schema) for the link target.
	Describedby *string `protobuf:"bytes,3,opt,name=describedby,proto3,oneof" json:"describedby,omitempty"`
	// a string which serves as a label for the destination of a link
	// such that it can be used as a human-readable identifier (e.g., a menu entry).
	Title *string `protobuf:"bytes,4,opt,name=title,proto3,oneof" json:"title,omitempty"`
	// a string indicating the media type of the link’s target.
	Type *string `protobuf:"bytes,5,opt,name=type,proto3,oneof" json:"type,omitempty"`
	// a string or an array of strings indicating the language(s) of the link’s target.
	// An array of strings indicates that the link’s target is available in multiple languages.
	Hreflang *string `protobuf:"bytes,6,opt,name=hreflang,proto3,oneof" json:"hreflang,omitempty"`
	// a meta object containing non-standard meta-information about the link.
	Meta map[string]*anypb.Any `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

Where specified, a links member can be used to represent links.

func (*Links) Descriptor deprecated

func (*Links) Descriptor() ([]byte, []int)

Deprecated: Use Links.ProtoReflect.Descriptor instead.

func (*Links) GetDescribedby

func (x *Links) GetDescribedby() string

func (*Links) GetHref

func (x *Links) GetHref() string

func (*Links) GetHreflang

func (x *Links) GetHreflang() string

func (*Links) GetMeta

func (x *Links) GetMeta() map[string]*anypb.Any

func (*Links) GetRel

func (x *Links) GetRel() string

func (*Links) GetTitle

func (x *Links) GetTitle() string

func (*Links) GetType

func (x *Links) GetType() string

func (*Links) ProtoMessage

func (*Links) ProtoMessage()

func (*Links) ProtoReflect

func (x *Links) ProtoReflect() protoreflect.Message

func (*Links) Reset

func (x *Links) Reset()

func (*Links) String

func (x *Links) String() string

type PageInfo

type PageInfo struct {

	// hasPreviousPage is used to indicate whether more edges exist prior to the set defined by the clients arguments.
	// If the client is paginating with last/before, then the server must return true if prior edges exist, otherwise false.
	// If the client is paginating with first/after, then the client may return true if edges prior to after exist,
	// if it can do so efficiently, otherwise may return false.
	HasPreviousPage bool `protobuf:"varint,1,opt,name=has_previous_page,json=hasPreviousPage,proto3" json:"has_previous_page,omitempty"`
	// hasNextPage is used to indicate whether more edges exist following the set defined by the clients arguments.
	// If the client is paginating with first/after, then the server must return true if further edges exist, otherwise false.
	// If the client is paginating with last/before, then the client may return true if edges further from before exist,
	// if it can do so efficiently, otherwise may return false.
	HasNextPage bool `protobuf:"varint,2,opt,name=has_next_page,json=hasNextPage,proto3" json:"has_next_page,omitempty"`
	// startCursor is the cursor to the first node in edges. Or the cursor of the representation of the first returned element.
	StartCursor *string `protobuf:"bytes,3,opt,name=start_cursor,json=startCursor,proto3,oneof" json:"start_cursor,omitempty"`
	// endCursor is the cursor to the last node in edges. Or the cursor of the representation of the last returned element.
	EndCursor *string `protobuf:"bytes,4,opt,name=end_cursor,json=endCursor,proto3,oneof" json:"end_cursor,omitempty"`
	// contains filtered or unexported fields
}

pageInfo is used to indicate whether more edges exist prior or following the set defined by the clients arguments.

func (*PageInfo) Descriptor deprecated

func (*PageInfo) Descriptor() ([]byte, []int)

Deprecated: Use PageInfo.ProtoReflect.Descriptor instead.

func (*PageInfo) GetEndCursor

func (x *PageInfo) GetEndCursor() string

func (*PageInfo) GetHasNextPage

func (x *PageInfo) GetHasNextPage() bool

func (*PageInfo) GetHasPreviousPage

func (x *PageInfo) GetHasPreviousPage() bool

func (*PageInfo) GetStartCursor

func (x *PageInfo) GetStartCursor() string

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) ProtoReflect

func (x *PageInfo) ProtoReflect() protoreflect.Message

func (*PageInfo) Reset

func (x *PageInfo) Reset()

func (*PageInfo) String

func (x *PageInfo) String() string

type PaginationRequest

type PaginationRequest struct {

	// first is the number of items to return from the beginning of the list.
	First int64 `protobuf:"varint,1,opt,name=first,proto3" json:"first,omitempty"`
	// after is the cursor to the first node in edges that should be returned.
	After *string `protobuf:"bytes,2,opt,name=after,proto3,oneof" json:"after,omitempty"`
	// last is the number of items to return from the end of the list.
	Last int64 `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
	// before is the cursor to the last node in edges that should be returned.
	Before *string `protobuf:"bytes,4,opt,name=before,proto3,oneof" json:"before,omitempty"`
	// contains filtered or unexported fields
}

func (*PaginationRequest) Descriptor deprecated

func (*PaginationRequest) Descriptor() ([]byte, []int)

Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.

func (*PaginationRequest) GetAfter

func (x *PaginationRequest) GetAfter() string

func (*PaginationRequest) GetBefore

func (x *PaginationRequest) GetBefore() string

func (*PaginationRequest) GetFirst

func (x *PaginationRequest) GetFirst() int64

func (*PaginationRequest) GetLast

func (x *PaginationRequest) GetLast() int64

func (*PaginationRequest) ProtoMessage

func (*PaginationRequest) ProtoMessage()

func (*PaginationRequest) ProtoReflect

func (x *PaginationRequest) ProtoReflect() protoreflect.Message

func (*PaginationRequest) Reset

func (x *PaginationRequest) Reset()

func (*PaginationRequest) String

func (x *PaginationRequest) String() string

type Response

type Response struct {

	// Data is the primary data for a response.
	Data []*anypb.Any `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// Errors is an array of error objects.
	Errors []*ErrorObject `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetData

func (x *Response) GetData() []*anypb.Any

func (*Response) GetErrors

func (x *Response) GetErrors() []*ErrorObject

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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