apex

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package apex provides Apex REST endpoint operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

type HTTPClient interface {
	Get(ctx context.Context, path string) ([]byte, error)
	Post(ctx context.Context, path string, body interface{}) ([]byte, error)
	Patch(ctx context.Context, path string, body interface{}) ([]byte, error)
	Put(ctx context.Context, path string, body interface{}) ([]byte, error)
	Delete(ctx context.Context, path string) ([]byte, error)
}

HTTPClient interface for dependency injection.

type Service

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

Service provides Apex REST endpoint operations.

func NewService

func NewService(client HTTPClient) *Service

NewService creates a new Apex REST service.

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, path string) ([]byte, error)

Delete calls DELETE on an Apex REST endpoint.

func (*Service) Get

func (s *Service) Get(ctx context.Context, path string) ([]byte, error)

Get calls GET on an Apex REST endpoint.

func (*Service) GetJSON

func (s *Service) GetJSON(ctx context.Context, path string, result interface{}) error

GetJSON calls GET and unmarshals JSON response.

func (*Service) Patch

func (s *Service) Patch(ctx context.Context, path string, body interface{}) ([]byte, error)

Patch calls PATCH on an Apex REST endpoint.

func (*Service) Post

func (s *Service) Post(ctx context.Context, path string, body interface{}) ([]byte, error)

Post calls POST on an Apex REST endpoint.

func (*Service) PostJSON

func (s *Service) PostJSON(ctx context.Context, path string, body, result interface{}) error

PostJSON calls POST and unmarshals JSON response.

func (*Service) Put

func (s *Service) Put(ctx context.Context, path string, body interface{}) ([]byte, error)

Put calls PUT on an Apex REST endpoint.

Jump to

Keyboard shortcuts

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