spec

package
v4.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 5

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"`
}

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"`
	Docs      *Documentation `json:"docs"`
	Markers   []Type         `json:"markers"`
}

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) 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 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"`
}

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"`
}

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"`
}

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 string
const (
	ErrorCodePermissionDenied      ErrorCode = "PERMISSION_DENIED"
	ErrorCodeInvalidArgument       ErrorCode = "INVALID_ARGUMENT"
	ErrorCodeNotFound              ErrorCode = "NOT_FOUND"
	ErrorCodeConflict              ErrorCode = "CONFLICT"
	ErrorCodeRequestEntityTooLarge ErrorCode = "REQUEST_ENTITY_TOO_LARGE"
	ErrorCodeFailedPrecondition    ErrorCode = "FAILED_PRECONDITION"
	ErrorCodeInternal              ErrorCode = "INTERNAL"
	ErrorCodeTimeout               ErrorCode = "TIMEOUT"
	ErrorCodeCustomClient          ErrorCode = "CUSTOM_CLIENT"
	ErrorCodeCustomServer          ErrorCode = "CUSTOM_SERVER"
	ErrorCodeUnknown               ErrorCode = "UNKNOWN"
)

func (*ErrorCode) UnmarshalText

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

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 preferrable.
	Fallback Type `` /* 238-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"`
}

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 string
const (
	HttpMethodGet     HttpMethod = "GET"
	HttpMethodPost    HttpMethod = "POST"
	HttpMethodPut     HttpMethod = "PUT"
	HttpMethodDelete  HttpMethod = "DELETE"
	HttpMethodUnknown HttpMethod = "UNKNOWN"
)

func (*HttpMethod) UnmarshalText

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

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 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) MarshalJSON

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

func (ParameterType) MarshalYAML

func (u ParameterType) MarshalYAML() (interface{}, 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 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 string
const (
	PrimitiveTypeString      PrimitiveType = "STRING"
	PrimitiveTypeDatetime    PrimitiveType = "DATETIME"
	PrimitiveTypeInteger     PrimitiveType = "INTEGER"
	PrimitiveTypeDouble      PrimitiveType = "DOUBLE"
	PrimitiveTypeSafelong    PrimitiveType = "SAFELONG"
	PrimitiveTypeBinary      PrimitiveType = "BINARY"
	PrimitiveTypeAny         PrimitiveType = "ANY"
	PrimitiveTypeBoolean     PrimitiveType = "BOOLEAN"
	PrimitiveTypeUuid        PrimitiveType = "UUID"
	PrimitiveTypeRid         PrimitiveType = "RID"
	PrimitiveTypeBearertoken PrimitiveType = "BEARERTOKEN"
	PrimitiveTypeUnknown     PrimitiveType = "UNKNOWN"
)

func (*PrimitiveType) UnmarshalText

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

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) MarshalJSON

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

func (Type) MarshalYAML

func (u Type) MarshalYAML() (interface{}, 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) MarshalJSON

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

func (TypeDefinition) MarshalYAML

func (u TypeDefinition) MarshalYAML() (interface{}, 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 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 `` /* 278-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 `` /* 316-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 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