httpcallv2

package
v0.109.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Lorem Ipsum

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComplexQueryParam

type ComplexQueryParam struct {
	NestedOptionalQueryParam string `json:"nested_optional_query_param,omitempty" url:"nested_optional_query_param,omitempty"`

	NestedRepeatedQueryParam []string `json:"nested_repeated_query_param,omitempty" url:"nested_repeated_query_param,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (ComplexQueryParam) MarshalJSON

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

func (*ComplexQueryParam) UnmarshalJSON

func (s *ComplexQueryParam) UnmarshalJSON(b []byte) error

type CreateResourceRequest

type CreateResourceRequest struct {
	// Body element
	BodyField string `json:"body_field,omitempty"`

	PathParamBool bool `json:"-" url:"-"`

	PathParamInt int `json:"-" url:"-"`

	PathParamString string `json:"-" url:"-"`

	ForceSendFields []string `json:"-" url:"-"`
}

This mimics "old" style post requests which have the resource inlined.

func (CreateResourceRequest) MarshalJSON

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

func (*CreateResourceRequest) UnmarshalJSON

func (s *CreateResourceRequest) UnmarshalJSON(b []byte) error

type GetResourceRequest

type GetResourceRequest struct {
	// The field mask must be a single string, with multiple fields separated by
	// commas (no spaces). The field path is relative to the resource object,
	// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
	// Specification of elements in sequence or map fields is not allowed, as
	// only the entire collection field can be specified. Field names must
	// exactly match the resource field names.
	FieldMask *fieldmask.FieldMask `json:"-" url:"field_mask,omitempty"`

	OptionalComplexQueryParam *ComplexQueryParam `json:"-" url:"optional_complex_query_param,omitempty"`

	PathParamBool bool `json:"-" url:"-"`

	PathParamInt int `json:"-" url:"-"`

	PathParamString string `json:"-" url:"-"`

	QueryParamBool bool `json:"-" url:"query_param_bool,omitempty"`

	QueryParamInt int `json:"-" url:"query_param_int,omitempty"`

	QueryParamString string `json:"-" url:"query_param_string,omitempty"`

	RepeatedComplexQueryParam []ComplexQueryParam `json:"-" url:"repeated_complex_query_param,omitempty"`

	RepeatedQueryParam []string `json:"-" url:"repeated_query_param,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (GetResourceRequest) MarshalJSON

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

func (*GetResourceRequest) UnmarshalJSON

func (s *GetResourceRequest) UnmarshalJSON(b []byte) error

type HttpCallV2API

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

Lorem Ipsum

func NewHttpCallV2

func NewHttpCallV2(client *client.DatabricksClient) *HttpCallV2API

func (*HttpCallV2API) CreateResource

func (a *HttpCallV2API) CreateResource(ctx context.Context, request CreateResourceRequest) (*Resource, error)

func (*HttpCallV2API) GetResource

func (a *HttpCallV2API) GetResource(ctx context.Context, request GetResourceRequest) (*Resource, error)

func (*HttpCallV2API) UpdateResource

func (a *HttpCallV2API) UpdateResource(ctx context.Context, request UpdateResourceRequest) (*Resource, error)

type HttpCallV2Interface

type HttpCallV2Interface interface {

	// This mimics "old" style post requests which have the resource inlined.
	CreateResource(ctx context.Context, request CreateResourceRequest) (*Resource, error)

	GetResource(ctx context.Context, request GetResourceRequest) (*Resource, error)

	// This mimics "new" style post requests which have a body field.
	UpdateResource(ctx context.Context, request UpdateResourceRequest) (*Resource, error)
}

type Resource

type Resource struct {
	AnyField json.RawMessage `json:"any_field,omitempty"`

	BodyField string `json:"body_field,omitempty"`

	NestedPathParamBool bool `json:"nested_path_param_bool,omitempty"`

	NestedPathParamInt int `json:"nested_path_param_int,omitempty"`

	NestedPathParamString string `json:"nested_path_param_string,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (Resource) MarshalJSON

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

func (*Resource) UnmarshalJSON

func (s *Resource) UnmarshalJSON(b []byte) error

type UpdateResourceRequest

type UpdateResourceRequest struct {
	// The field mask must be a single string, with multiple fields separated by
	// commas (no spaces). The field path is relative to the resource object,
	// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
	// Specification of elements in sequence or map fields is not allowed, as
	// only the entire collection field can be specified. Field names must
	// exactly match the resource field names.
	FieldMask *fieldmask.FieldMask `json:"-" url:"field_mask,omitempty"`

	NestedPathParamBool bool `json:"-" url:"-"`

	NestedPathParamInt int `json:"-" url:"-"`

	NestedPathParamString string `json:"-" url:"-"`

	OptionalComplexQueryParam *ComplexQueryParam `json:"-" url:"optional_complex_query_param,omitempty"`

	QueryParamBool bool `json:"-" url:"query_param_bool,omitempty"`

	QueryParamInt int `json:"-" url:"query_param_int,omitempty"`

	QueryParamString string `json:"-" url:"query_param_string,omitempty"`

	RepeatedComplexQueryParam []ComplexQueryParam `json:"-" url:"repeated_complex_query_param,omitempty"`

	RepeatedQueryParam []string `json:"-" url:"repeated_query_param,omitempty"`
	// Body element
	Resource Resource `json:"resource"`

	ForceSendFields []string `json:"-" url:"-"`
}

func (UpdateResourceRequest) MarshalJSON

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

func (*UpdateResourceRequest) UnmarshalJSON

func (s *UpdateResourceRequest) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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