spec

package
v6.60.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AliasDefinition

type AliasDefinition struct {
	TypeName TypeName       `json:"typeName"`
	Alias    Type           `json:"alias"`
	Docs     *Documentation `json:"docs"`
	Safety   *LogSafety     `json:"safety"`
}

func (AliasDefinition) MarshalYAML

func (o AliasDefinition) MarshalYAML() (interface{}, error)

func (*AliasDefinition) UnmarshalYAML

func (o *AliasDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type ArgumentDefinition

type ArgumentDefinition struct {
	ArgName   ArgumentName   `json:"argName"`
	Type      Type           `json:"type"`
	ParamType ParameterType  `json:"paramType"`
	Safety    *LogSafety     `json:"safety"`
	Docs      *Documentation `json:"docs"`
	Markers   []Type         `json:"markers"`
	Tags      []string       `json:"tags"`
}

func (ArgumentDefinition) MarshalJSON

func (o ArgumentDefinition) MarshalJSON() ([]byte, error)

func (ArgumentDefinition) MarshalYAML

func (o ArgumentDefinition) MarshalYAML() (interface{}, error)

func (*ArgumentDefinition) UnmarshalJSON

func (o *ArgumentDefinition) UnmarshalJSON(data []byte) error

func (*ArgumentDefinition) UnmarshalYAML

func (o *ArgumentDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type ArgumentName

type ArgumentName string

Must be in lowerCamelCase. Numbers are permitted, but not at the beginning of a word. Allowed argument names: "fooBar", "build2Request". Disallowed names: "FooBar", "2BuildRequest".

type AuthType

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

func NewAuthTypeFromCookie

func NewAuthTypeFromCookie(v CookieAuthType) AuthType

func NewAuthTypeFromHeader

func NewAuthTypeFromHeader(v HeaderAuthType) AuthType

func (*AuthType) Accept

func (u *AuthType) Accept(v AuthTypeVisitor) error

func (*AuthType) AcceptFuncs added in v6.6.0

func (u *AuthType) AcceptFuncs(headerFunc func(HeaderAuthType) error, cookieFunc func(CookieAuthType) error, unknownFunc func(string) error) error

func (*AuthType) AcceptWithContext

func (u *AuthType) AcceptWithContext(ctx context.Context, v AuthTypeVisitorWithContext) error

func (*AuthType) CookieNoopSuccess added in v6.6.0

func (u *AuthType) CookieNoopSuccess(CookieAuthType) error

func (*AuthType) ErrorOnUnknown added in v6.6.0

func (u *AuthType) ErrorOnUnknown(typeName string) error

func (*AuthType) HeaderNoopSuccess added in v6.6.0

func (u *AuthType) HeaderNoopSuccess(HeaderAuthType) error

func (AuthType) MarshalJSON

func (u AuthType) MarshalJSON() ([]byte, error)

func (AuthType) MarshalYAML

func (u AuthType) MarshalYAML() (interface{}, error)

func (*AuthType) UnmarshalJSON

func (u *AuthType) UnmarshalJSON(data []byte) error

func (*AuthType) UnmarshalYAML

func (u *AuthType) UnmarshalYAML(unmarshal func(interface{}) error) error

type AuthTypeVisitor

type AuthTypeVisitor interface {
	VisitHeader(v HeaderAuthType) error
	VisitCookie(v CookieAuthType) error
	VisitUnknown(typeName string) error
}

type AuthTypeVisitorWithContext

type AuthTypeVisitorWithContext interface {
	VisitHeaderWithContext(ctx context.Context, v HeaderAuthType) error
	VisitCookieWithContext(ctx context.Context, v CookieAuthType) error
	VisitUnknownWithContext(ctx context.Context, typeName string) error
}

type AuthTypeVisitorWithT added in v6.18.0

type AuthTypeVisitorWithT[T any] interface {
	VisitHeader(ctx context.Context, v HeaderAuthType) (T, error)
	VisitCookie(ctx context.Context, v CookieAuthType) (T, error)
	VisitUnknown(ctx context.Context, typ string) (T, error)
}

type AuthTypeWithT added in v6.18.0

type AuthTypeWithT[T any] AuthType

func (*AuthTypeWithT[T]) Accept added in v6.18.0

func (u *AuthTypeWithT[T]) Accept(ctx context.Context, v AuthTypeVisitorWithT[T]) (T, error)

type BodyParameterType

type BodyParameterType struct{}

func (BodyParameterType) MarshalYAML

func (o BodyParameterType) MarshalYAML() (interface{}, error)

func (*BodyParameterType) UnmarshalYAML

func (o *BodyParameterType) UnmarshalYAML(unmarshal func(interface{}) error) error

type ConjureDefinition

type ConjureDefinition struct {
	Version    int                    `json:"version"`
	Errors     []ErrorDefinition      `json:"errors"`
	Types      []TypeDefinition       `json:"types"`
	Services   []ServiceDefinition    `json:"services"`
	Extensions map[string]interface{} `json:"extensions"`
}

func (ConjureDefinition) MarshalJSON

func (o ConjureDefinition) MarshalJSON() ([]byte, error)

func (ConjureDefinition) MarshalYAML

func (o ConjureDefinition) MarshalYAML() (interface{}, error)

func (*ConjureDefinition) UnmarshalJSON

func (o *ConjureDefinition) UnmarshalJSON(data []byte) error

func (*ConjureDefinition) UnmarshalYAML

func (o *ConjureDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type CookieAuthType

type CookieAuthType struct {
	CookieName string `json:"cookieName"`
}

func (CookieAuthType) MarshalYAML

func (o CookieAuthType) MarshalYAML() (interface{}, error)

func (*CookieAuthType) UnmarshalYAML

func (o *CookieAuthType) UnmarshalYAML(unmarshal func(interface{}) error) error

type Documentation

type Documentation string

type EndpointDefinition

type EndpointDefinition struct {
	EndpointName EndpointName         `json:"endpointName"`
	HttpMethod   HttpMethod           `json:"httpMethod"`
	HttpPath     HttpPath             `json:"httpPath"`
	Auth         *AuthType            `json:"auth"`
	Args         []ArgumentDefinition `json:"args"`
	Returns      *Type                `json:"returns"`
	Docs         *Documentation       `json:"docs"`
	Deprecated   *Documentation       `json:"deprecated"`
	Markers      []Type               `json:"markers"`
	Tags         []string             `json:"tags"`
}

func (EndpointDefinition) MarshalJSON

func (o EndpointDefinition) MarshalJSON() ([]byte, error)

func (EndpointDefinition) MarshalYAML

func (o EndpointDefinition) MarshalYAML() (interface{}, error)

func (*EndpointDefinition) UnmarshalJSON

func (o *EndpointDefinition) UnmarshalJSON(data []byte) error

func (*EndpointDefinition) UnmarshalYAML

func (o *EndpointDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type EndpointName

type EndpointName string

Should be in lowerCamelCase.

type EnumDefinition

type EnumDefinition struct {
	TypeName TypeName              `json:"typeName"`
	Values   []EnumValueDefinition `json:"values"`
	Docs     *Documentation        `json:"docs"`
}

func (EnumDefinition) MarshalJSON

func (o EnumDefinition) MarshalJSON() ([]byte, error)

func (EnumDefinition) MarshalYAML

func (o EnumDefinition) MarshalYAML() (interface{}, error)

func (*EnumDefinition) UnmarshalJSON

func (o *EnumDefinition) UnmarshalJSON(data []byte) error

func (*EnumDefinition) UnmarshalYAML

func (o *EnumDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type EnumValueDefinition

type EnumValueDefinition struct {
	Value      string         `json:"value"`
	Docs       *Documentation `json:"docs"`
	Deprecated *Documentation `json:"deprecated"`
}

func (EnumValueDefinition) MarshalYAML

func (o EnumValueDefinition) MarshalYAML() (interface{}, error)

func (*EnumValueDefinition) UnmarshalYAML

func (o *EnumValueDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type ErrorCode

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

func New_ErrorCode

func New_ErrorCode(value ErrorCode_Value) ErrorCode

func (ErrorCode) IsUnknown

func (e ErrorCode) IsUnknown() bool

IsUnknown returns false for all known variants of ErrorCode and true otherwise.

func (ErrorCode) MarshalText

func (e ErrorCode) MarshalText() ([]byte, error)

func (ErrorCode) String

func (e ErrorCode) String() string

func (*ErrorCode) UnmarshalText

func (e *ErrorCode) UnmarshalText(data []byte) error

func (ErrorCode) Value

func (e ErrorCode) Value() ErrorCode_Value

type ErrorCode_Value

type ErrorCode_Value string
const (
	ErrorCode_PERMISSION_DENIED        ErrorCode_Value = "PERMISSION_DENIED"
	ErrorCode_INVALID_ARGUMENT         ErrorCode_Value = "INVALID_ARGUMENT"
	ErrorCode_NOT_FOUND                ErrorCode_Value = "NOT_FOUND"
	ErrorCode_CONFLICT                 ErrorCode_Value = "CONFLICT"
	ErrorCode_REQUEST_ENTITY_TOO_LARGE ErrorCode_Value = "REQUEST_ENTITY_TOO_LARGE"
	ErrorCode_FAILED_PRECONDITION      ErrorCode_Value = "FAILED_PRECONDITION"
	ErrorCode_INTERNAL                 ErrorCode_Value = "INTERNAL"
	ErrorCode_TIMEOUT                  ErrorCode_Value = "TIMEOUT"
	ErrorCode_CUSTOM_CLIENT            ErrorCode_Value = "CUSTOM_CLIENT"
	ErrorCode_CUSTOM_SERVER            ErrorCode_Value = "CUSTOM_SERVER"
	ErrorCode_UNKNOWN                  ErrorCode_Value = "UNKNOWN"
)

func ErrorCode_Values

func ErrorCode_Values() []ErrorCode_Value

ErrorCode_Values returns all known variants of ErrorCode.

type ErrorDefinition

type ErrorDefinition struct {
	ErrorName  TypeName          `json:"errorName"`
	Docs       *Documentation    `json:"docs"`
	Namespace  ErrorNamespace    `json:"namespace"`
	Code       ErrorCode         `json:"code"`
	SafeArgs   []FieldDefinition `json:"safeArgs"`
	UnsafeArgs []FieldDefinition `json:"unsafeArgs"`
}

func (ErrorDefinition) MarshalJSON

func (o ErrorDefinition) MarshalJSON() ([]byte, error)

func (ErrorDefinition) MarshalYAML

func (o ErrorDefinition) MarshalYAML() (interface{}, error)

func (*ErrorDefinition) UnmarshalJSON

func (o *ErrorDefinition) UnmarshalJSON(data []byte) error

func (*ErrorDefinition) UnmarshalYAML

func (o *ErrorDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type ErrorNamespace

type ErrorNamespace string

type ExternalReference

type ExternalReference struct {
	// An identifier for a non-Conjure type which is already defined in a different language (e.g. Java).
	ExternalReference TypeName `` /* 138-byte string literal not displayed */
	// Other language generators may use the provided fallback if the non-Conjure type is not available. The ANY PrimitiveType is permissible for all external types, but a more specific definition is preferable.
	Fallback Type `` /* 235-byte string literal not displayed */
}

func (ExternalReference) MarshalYAML

func (o ExternalReference) MarshalYAML() (interface{}, error)

func (*ExternalReference) UnmarshalYAML

func (o *ExternalReference) UnmarshalYAML(unmarshal func(interface{}) error) error

type FieldDefinition

type FieldDefinition struct {
	FieldName  FieldName      `json:"fieldName"`
	Type       Type           `json:"type"`
	Docs       *Documentation `json:"docs"`
	Deprecated *Documentation `json:"deprecated"`
	Safety     *LogSafety     `json:"safety"`
}

func (FieldDefinition) MarshalYAML

func (o FieldDefinition) MarshalYAML() (interface{}, error)

func (*FieldDefinition) UnmarshalYAML

func (o *FieldDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type FieldName

type FieldName string

Should be in lowerCamelCase, but kebab-case and snake_case are also permitted.

type HeaderAuthType

type HeaderAuthType struct{}

func (HeaderAuthType) MarshalYAML

func (o HeaderAuthType) MarshalYAML() (interface{}, error)

func (*HeaderAuthType) UnmarshalYAML

func (o *HeaderAuthType) UnmarshalYAML(unmarshal func(interface{}) error) error

type HeaderParameterType

type HeaderParameterType struct {
	ParamId ParameterId `json:"paramId"`
}

func (HeaderParameterType) MarshalYAML

func (o HeaderParameterType) MarshalYAML() (interface{}, error)

func (*HeaderParameterType) UnmarshalYAML

func (o *HeaderParameterType) UnmarshalYAML(unmarshal func(interface{}) error) error

type HttpMethod

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

func New_HttpMethod

func New_HttpMethod(value HttpMethod_Value) HttpMethod

func (HttpMethod) IsUnknown

func (e HttpMethod) IsUnknown() bool

IsUnknown returns false for all known variants of HttpMethod and true otherwise.

func (HttpMethod) MarshalText

func (e HttpMethod) MarshalText() ([]byte, error)

func (HttpMethod) String

func (e HttpMethod) String() string

func (*HttpMethod) UnmarshalText

func (e *HttpMethod) UnmarshalText(data []byte) error

func (HttpMethod) Value

func (e HttpMethod) Value() HttpMethod_Value

type HttpMethod_Value

type HttpMethod_Value string
const (
	HttpMethod_GET     HttpMethod_Value = "GET"
	HttpMethod_POST    HttpMethod_Value = "POST"
	HttpMethod_PUT     HttpMethod_Value = "PUT"
	HttpMethod_DELETE  HttpMethod_Value = "DELETE"
	HttpMethod_UNKNOWN HttpMethod_Value = "UNKNOWN"
)

func HttpMethod_Values

func HttpMethod_Values() []HttpMethod_Value

HttpMethod_Values returns all known variants of HttpMethod.

type HttpPath

type HttpPath string

type ListType

type ListType struct {
	ItemType Type `json:"itemType"`
}

func (ListType) MarshalYAML

func (o ListType) MarshalYAML() (interface{}, error)

func (*ListType) UnmarshalYAML

func (o *ListType) UnmarshalYAML(unmarshal func(interface{}) error) error

type LogSafety added in v6.34.0

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

Safety with regards to logging based on [safe-logging](https://github.com/palantir/safe-logging) concepts.

func New_LogSafety added in v6.34.0

func New_LogSafety(value LogSafety_Value) LogSafety

func (LogSafety) IsUnknown added in v6.34.0

func (e LogSafety) IsUnknown() bool

IsUnknown returns false for all known variants of LogSafety and true otherwise.

func (LogSafety) MarshalText added in v6.34.0

func (e LogSafety) MarshalText() ([]byte, error)

func (LogSafety) String added in v6.34.0

func (e LogSafety) String() string

func (*LogSafety) UnmarshalText added in v6.34.0

func (e *LogSafety) UnmarshalText(data []byte) error

func (LogSafety) Value added in v6.34.0

func (e LogSafety) Value() LogSafety_Value

type LogSafety_Value added in v6.34.0

type LogSafety_Value string
const (
	// Explicitly marks an element as safe.
	LogSafety_SAFE LogSafety_Value = "SAFE"
	// Explicitly marks an element as unsafe, diallowing contents from being logged as `SAFE`.
	LogSafety_UNSAFE LogSafety_Value = "UNSAFE"
	// Marks elements that must never be logged. For example, credentials, keys, and other secrets cannot be logged because such an action would compromise security.
	LogSafety_DO_NOT_LOG LogSafety_Value = "DO_NOT_LOG"
	LogSafety_UNKNOWN    LogSafety_Value = "UNKNOWN"
)

func LogSafety_Values added in v6.34.0

func LogSafety_Values() []LogSafety_Value

LogSafety_Values returns all known variants of LogSafety.

type MapType

type MapType struct {
	KeyType   Type `json:"keyType"`
	ValueType Type `json:"valueType"`
}

func (MapType) MarshalYAML

func (o MapType) MarshalYAML() (interface{}, error)

func (*MapType) UnmarshalYAML

func (o *MapType) UnmarshalYAML(unmarshal func(interface{}) error) error

type ObjectDefinition

type ObjectDefinition struct {
	TypeName TypeName          `json:"typeName"`
	Fields   []FieldDefinition `json:"fields"`
	Docs     *Documentation    `json:"docs"`
}

func (ObjectDefinition) MarshalJSON

func (o ObjectDefinition) MarshalJSON() ([]byte, error)

func (ObjectDefinition) MarshalYAML

func (o ObjectDefinition) MarshalYAML() (interface{}, error)

func (*ObjectDefinition) UnmarshalJSON

func (o *ObjectDefinition) UnmarshalJSON(data []byte) error

func (*ObjectDefinition) UnmarshalYAML

func (o *ObjectDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type OptionalType

type OptionalType struct {
	ItemType Type `json:"itemType"`
}

func (OptionalType) MarshalYAML

func (o OptionalType) MarshalYAML() (interface{}, error)

func (*OptionalType) UnmarshalYAML

func (o *OptionalType) UnmarshalYAML(unmarshal func(interface{}) error) error

type ParameterId

type ParameterId string

For header parameters, the parameter id must be in Upper-Kebab-Case. For query parameters, the parameter id must be in lowerCamelCase. Numbers are permitted, but not at the beginning of a word.

type ParameterType

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

func NewParameterTypeFromBody

func NewParameterTypeFromBody(v BodyParameterType) ParameterType

func NewParameterTypeFromHeader

func NewParameterTypeFromHeader(v HeaderParameterType) ParameterType

func NewParameterTypeFromPath

func NewParameterTypeFromPath(v PathParameterType) ParameterType

func NewParameterTypeFromQuery

func NewParameterTypeFromQuery(v QueryParameterType) ParameterType

func (*ParameterType) Accept

func (*ParameterType) AcceptFuncs added in v6.6.0

func (u *ParameterType) AcceptFuncs(bodyFunc func(BodyParameterType) error, headerFunc func(HeaderParameterType) error, pathFunc func(PathParameterType) error, queryFunc func(QueryParameterType) error, unknownFunc func(string) error) error

func (*ParameterType) AcceptWithContext

func (u *ParameterType) AcceptWithContext(ctx context.Context, v ParameterTypeVisitorWithContext) error

func (*ParameterType) BodyNoopSuccess added in v6.6.0

func (u *ParameterType) BodyNoopSuccess(BodyParameterType) error

func (*ParameterType) ErrorOnUnknown added in v6.6.0

func (u *ParameterType) ErrorOnUnknown(typeName string) error

func (*ParameterType) HeaderNoopSuccess added in v6.6.0

func (u *ParameterType) HeaderNoopSuccess(HeaderParameterType) error

func (ParameterType) MarshalJSON

func (u ParameterType) MarshalJSON() ([]byte, error)

func (ParameterType) MarshalYAML

func (u ParameterType) MarshalYAML() (interface{}, error)

func (*ParameterType) PathNoopSuccess added in v6.6.0

func (u *ParameterType) PathNoopSuccess(PathParameterType) error

func (*ParameterType) QueryNoopSuccess added in v6.6.0

func (u *ParameterType) QueryNoopSuccess(QueryParameterType) error

func (*ParameterType) UnmarshalJSON

func (u *ParameterType) UnmarshalJSON(data []byte) error

func (*ParameterType) UnmarshalYAML

func (u *ParameterType) UnmarshalYAML(unmarshal func(interface{}) error) error

type ParameterTypeVisitor

type ParameterTypeVisitor interface {
	VisitBody(v BodyParameterType) error
	VisitHeader(v HeaderParameterType) error
	VisitPath(v PathParameterType) error
	VisitQuery(v QueryParameterType) error
	VisitUnknown(typeName string) error
}

type ParameterTypeVisitorWithContext

type ParameterTypeVisitorWithContext interface {
	VisitBodyWithContext(ctx context.Context, v BodyParameterType) error
	VisitHeaderWithContext(ctx context.Context, v HeaderParameterType) error
	VisitPathWithContext(ctx context.Context, v PathParameterType) error
	VisitQueryWithContext(ctx context.Context, v QueryParameterType) error
	VisitUnknownWithContext(ctx context.Context, typeName string) error
}

type ParameterTypeVisitorWithT added in v6.18.0

type ParameterTypeVisitorWithT[T any] interface {
	VisitBody(ctx context.Context, v BodyParameterType) (T, error)
	VisitHeader(ctx context.Context, v HeaderParameterType) (T, error)
	VisitPath(ctx context.Context, v PathParameterType) (T, error)
	VisitQuery(ctx context.Context, v QueryParameterType) (T, error)
	VisitUnknown(ctx context.Context, typ string) (T, error)
}

type ParameterTypeWithT added in v6.18.0

type ParameterTypeWithT[T any] ParameterType

func (*ParameterTypeWithT[T]) Accept added in v6.18.0

func (u *ParameterTypeWithT[T]) Accept(ctx context.Context, v ParameterTypeVisitorWithT[T]) (T, error)

type PathParameterType

type PathParameterType struct{}

func (PathParameterType) MarshalYAML

func (o PathParameterType) MarshalYAML() (interface{}, error)

func (*PathParameterType) UnmarshalYAML

func (o *PathParameterType) UnmarshalYAML(unmarshal func(interface{}) error) error

type PrimitiveType

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

func New_PrimitiveType

func New_PrimitiveType(value PrimitiveType_Value) PrimitiveType

func (PrimitiveType) IsUnknown

func (e PrimitiveType) IsUnknown() bool

IsUnknown returns false for all known variants of PrimitiveType and true otherwise.

func (PrimitiveType) MarshalText

func (e PrimitiveType) MarshalText() ([]byte, error)

func (PrimitiveType) String

func (e PrimitiveType) String() string

func (*PrimitiveType) UnmarshalText

func (e *PrimitiveType) UnmarshalText(data []byte) error

func (PrimitiveType) Value

type PrimitiveType_Value

type PrimitiveType_Value string
const (
	PrimitiveType_STRING      PrimitiveType_Value = "STRING"
	PrimitiveType_DATETIME    PrimitiveType_Value = "DATETIME"
	PrimitiveType_INTEGER     PrimitiveType_Value = "INTEGER"
	PrimitiveType_DOUBLE      PrimitiveType_Value = "DOUBLE"
	PrimitiveType_SAFELONG    PrimitiveType_Value = "SAFELONG"
	PrimitiveType_BINARY      PrimitiveType_Value = "BINARY"
	PrimitiveType_ANY         PrimitiveType_Value = "ANY"
	PrimitiveType_BOOLEAN     PrimitiveType_Value = "BOOLEAN"
	PrimitiveType_UUID        PrimitiveType_Value = "UUID"
	PrimitiveType_RID         PrimitiveType_Value = "RID"
	PrimitiveType_BEARERTOKEN PrimitiveType_Value = "BEARERTOKEN"
	PrimitiveType_UNKNOWN     PrimitiveType_Value = "UNKNOWN"
)

func PrimitiveType_Values

func PrimitiveType_Values() []PrimitiveType_Value

PrimitiveType_Values returns all known variants of PrimitiveType.

type QueryParameterType

type QueryParameterType struct {
	ParamId ParameterId `json:"paramId"`
}

func (QueryParameterType) MarshalYAML

func (o QueryParameterType) MarshalYAML() (interface{}, error)

func (*QueryParameterType) UnmarshalYAML

func (o *QueryParameterType) UnmarshalYAML(unmarshal func(interface{}) error) error

type ServiceDefinition

type ServiceDefinition struct {
	ServiceName TypeName             `json:"serviceName"`
	Endpoints   []EndpointDefinition `json:"endpoints"`
	Docs        *Documentation       `json:"docs"`
}

func (ServiceDefinition) MarshalJSON

func (o ServiceDefinition) MarshalJSON() ([]byte, error)

func (ServiceDefinition) MarshalYAML

func (o ServiceDefinition) MarshalYAML() (interface{}, error)

func (*ServiceDefinition) UnmarshalJSON

func (o *ServiceDefinition) UnmarshalJSON(data []byte) error

func (*ServiceDefinition) UnmarshalYAML

func (o *ServiceDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type SetType

type SetType struct {
	ItemType Type `json:"itemType"`
}

func (SetType) MarshalYAML

func (o SetType) MarshalYAML() (interface{}, error)

func (*SetType) UnmarshalYAML

func (o *SetType) UnmarshalYAML(unmarshal func(interface{}) error) error

type Type

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

func NewTypeFromExternal

func NewTypeFromExternal(v ExternalReference) Type

func NewTypeFromList

func NewTypeFromList(v ListType) Type

func NewTypeFromMap

func NewTypeFromMap(v MapType) Type

func NewTypeFromOptional

func NewTypeFromOptional(v OptionalType) Type

func NewTypeFromPrimitive

func NewTypeFromPrimitive(v PrimitiveType) Type

func NewTypeFromReference

func NewTypeFromReference(v TypeName) Type

func NewTypeFromSet

func NewTypeFromSet(v SetType) Type

func (*Type) Accept

func (u *Type) Accept(v TypeVisitor) error

func (*Type) AcceptFuncs added in v6.6.0

func (u *Type) AcceptFuncs(primitiveFunc func(PrimitiveType) error, optionalFunc func(OptionalType) error, listFunc func(ListType) error, setFunc func(SetType) error, map_Func func(MapType) error, referenceFunc func(TypeName) error, externalFunc func(ExternalReference) error, unknownFunc func(string) error) error

func (*Type) AcceptWithContext

func (u *Type) AcceptWithContext(ctx context.Context, v TypeVisitorWithContext) error

func (*Type) ErrorOnUnknown added in v6.6.0

func (u *Type) ErrorOnUnknown(typeName string) error

func (*Type) ExternalNoopSuccess added in v6.6.0

func (u *Type) ExternalNoopSuccess(ExternalReference) error

func (*Type) ListNoopSuccess added in v6.6.0

func (u *Type) ListNoopSuccess(ListType) error

func (*Type) MapNoopSuccess added in v6.6.0

func (u *Type) MapNoopSuccess(MapType) error

func (Type) MarshalJSON

func (u Type) MarshalJSON() ([]byte, error)

func (Type) MarshalYAML

func (u Type) MarshalYAML() (interface{}, error)

func (*Type) OptionalNoopSuccess added in v6.6.0

func (u *Type) OptionalNoopSuccess(OptionalType) error

func (*Type) PrimitiveNoopSuccess added in v6.6.0

func (u *Type) PrimitiveNoopSuccess(PrimitiveType) error

func (*Type) ReferenceNoopSuccess added in v6.6.0

func (u *Type) ReferenceNoopSuccess(TypeName) error

func (*Type) SetNoopSuccess added in v6.6.0

func (u *Type) SetNoopSuccess(SetType) error

func (*Type) UnmarshalJSON

func (u *Type) UnmarshalJSON(data []byte) error

func (*Type) UnmarshalYAML

func (u *Type) UnmarshalYAML(unmarshal func(interface{}) error) error

type TypeDefinition

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

func NewTypeDefinitionFromAlias

func NewTypeDefinitionFromAlias(v AliasDefinition) TypeDefinition

func NewTypeDefinitionFromEnum

func NewTypeDefinitionFromEnum(v EnumDefinition) TypeDefinition

func NewTypeDefinitionFromObject

func NewTypeDefinitionFromObject(v ObjectDefinition) TypeDefinition

func NewTypeDefinitionFromUnion

func NewTypeDefinitionFromUnion(v UnionDefinition) TypeDefinition

func (*TypeDefinition) Accept

func (*TypeDefinition) AcceptFuncs added in v6.6.0

func (u *TypeDefinition) AcceptFuncs(aliasFunc func(AliasDefinition) error, enumFunc func(EnumDefinition) error, objectFunc func(ObjectDefinition) error, unionFunc func(UnionDefinition) error, unknownFunc func(string) error) error

func (*TypeDefinition) AcceptWithContext

func (*TypeDefinition) AliasNoopSuccess added in v6.6.0

func (u *TypeDefinition) AliasNoopSuccess(AliasDefinition) error

func (*TypeDefinition) EnumNoopSuccess added in v6.6.0

func (u *TypeDefinition) EnumNoopSuccess(EnumDefinition) error

func (*TypeDefinition) ErrorOnUnknown added in v6.6.0

func (u *TypeDefinition) ErrorOnUnknown(typeName string) error

func (TypeDefinition) MarshalJSON

func (u TypeDefinition) MarshalJSON() ([]byte, error)

func (TypeDefinition) MarshalYAML

func (u TypeDefinition) MarshalYAML() (interface{}, error)

func (*TypeDefinition) ObjectNoopSuccess added in v6.6.0

func (u *TypeDefinition) ObjectNoopSuccess(ObjectDefinition) error

func (*TypeDefinition) UnionNoopSuccess added in v6.6.0

func (u *TypeDefinition) UnionNoopSuccess(UnionDefinition) error

func (*TypeDefinition) UnmarshalJSON

func (u *TypeDefinition) UnmarshalJSON(data []byte) error

func (*TypeDefinition) UnmarshalYAML

func (u *TypeDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

type TypeDefinitionVisitor

type TypeDefinitionVisitor interface {
	VisitAlias(v AliasDefinition) error
	VisitEnum(v EnumDefinition) error
	VisitObject(v ObjectDefinition) error
	VisitUnion(v UnionDefinition) error
	VisitUnknown(typeName string) error
}

type TypeDefinitionVisitorWithContext

type TypeDefinitionVisitorWithContext interface {
	VisitAliasWithContext(ctx context.Context, v AliasDefinition) error
	VisitEnumWithContext(ctx context.Context, v EnumDefinition) error
	VisitObjectWithContext(ctx context.Context, v ObjectDefinition) error
	VisitUnionWithContext(ctx context.Context, v UnionDefinition) error
	VisitUnknownWithContext(ctx context.Context, typeName string) error
}

type TypeDefinitionVisitorWithT added in v6.18.0

type TypeDefinitionVisitorWithT[T any] interface {
	VisitAlias(ctx context.Context, v AliasDefinition) (T, error)
	VisitEnum(ctx context.Context, v EnumDefinition) (T, error)
	VisitObject(ctx context.Context, v ObjectDefinition) (T, error)
	VisitUnion(ctx context.Context, v UnionDefinition) (T, error)
	VisitUnknown(ctx context.Context, typ string) (T, error)
}

type TypeDefinitionWithT added in v6.18.0

type TypeDefinitionWithT[T any] TypeDefinition

func (*TypeDefinitionWithT[T]) Accept added in v6.18.0

type TypeName

type TypeName struct {
	// The name of the custom Conjure type or service. It must be in UpperCamelCase. Numbers are permitted, but not at the beginning of a word. Allowed names: "FooBar", "XYCoordinate", "Build2Request". Disallowed names: "fooBar", "2BuildRequest".
	Name string `` /* 276-byte string literal not displayed */
	// A period-delimited string of package names. The package names must be lowercase. Numbers are permitted, but not at the beginning of a package name. Allowed packages: "foo", "com.palantir.bar", "com.palantir.foo.thing2". Disallowed packages: "Foo", "com.palantir.foo.2thing".
	Package string `` /* 314-byte string literal not displayed */
}

func (TypeName) MarshalYAML

func (o TypeName) MarshalYAML() (interface{}, error)

func (*TypeName) UnmarshalYAML

func (o *TypeName) UnmarshalYAML(unmarshal func(interface{}) error) error

type TypeVisitor

type TypeVisitor interface {
	VisitPrimitive(v PrimitiveType) error
	VisitOptional(v OptionalType) error
	VisitList(v ListType) error
	VisitSet(v SetType) error
	VisitMap(v MapType) error
	VisitReference(v TypeName) error
	VisitExternal(v ExternalReference) error
	VisitUnknown(typeName string) error
}

type TypeVisitorWithContext

type TypeVisitorWithContext interface {
	VisitPrimitiveWithContext(ctx context.Context, v PrimitiveType) error
	VisitOptionalWithContext(ctx context.Context, v OptionalType) error
	VisitListWithContext(ctx context.Context, v ListType) error
	VisitSetWithContext(ctx context.Context, v SetType) error
	VisitMapWithContext(ctx context.Context, v MapType) error
	VisitReferenceWithContext(ctx context.Context, v TypeName) error
	VisitExternalWithContext(ctx context.Context, v ExternalReference) error
	VisitUnknownWithContext(ctx context.Context, typeName string) error
}

type TypeVisitorWithT added in v6.18.0

type TypeVisitorWithT[T any] interface {
	VisitPrimitive(ctx context.Context, v PrimitiveType) (T, error)
	VisitOptional(ctx context.Context, v OptionalType) (T, error)
	VisitList(ctx context.Context, v ListType) (T, error)
	VisitSet(ctx context.Context, v SetType) (T, error)
	VisitMap(ctx context.Context, v MapType) (T, error)
	VisitReference(ctx context.Context, v TypeName) (T, error)
	VisitExternal(ctx context.Context, v ExternalReference) (T, error)
	VisitUnknown(ctx context.Context, typ string) (T, error)
}

type TypeWithT added in v6.18.0

type TypeWithT[T any] Type

func (*TypeWithT[T]) Accept added in v6.18.0

func (u *TypeWithT[T]) Accept(ctx context.Context, v TypeVisitorWithT[T]) (T, error)

type UnionDefinition

type UnionDefinition struct {
	TypeName TypeName          `json:"typeName"`
	Union    []FieldDefinition `json:"union"`
	Docs     *Documentation    `json:"docs"`
}

func (UnionDefinition) MarshalJSON

func (o UnionDefinition) MarshalJSON() ([]byte, error)

func (UnionDefinition) MarshalYAML

func (o UnionDefinition) MarshalYAML() (interface{}, error)

func (*UnionDefinition) UnmarshalJSON

func (o *UnionDefinition) UnmarshalJSON(data []byte) error

func (*UnionDefinition) UnmarshalYAML

func (o *UnionDefinition) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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