repository

package
v6.24.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Executes a GET rest request and returns the response into the destination struct
	Get(request rest.Request, dest interface{}) error
	// Executes a PUT request, not expecting any response from the api server
	Put(request rest.Request) error
	// Executes a PUT request, not expecting any response from the api server
	PutWithResponse(request rest.Request) (rest.Response, error)
	// Executes a POST request, not expecting any response from the api server
	Post(request rest.Request) error
	// Executes a POST request, expecting response from the api server
	PostWithResponse(request rest.Request) (rest.Response, error)
	// Executes a DELETE request, not expecting any response from the api server
	Delete(request rest.Request) error
	// Executes a PATCH request, not expecting any response from the api server
	Patch(restRequest rest.Request) error
	// Executes a PATCH request, expecting response from the api server
	PatchWithResponse(request rest.Request) (rest.Response, error)
}

Client interface, this is the client interface as far as other packages should care about

type RestRepository

type RestRepository struct {
	// we have a client that follows the Client interface
	Client Client
}

RestRepository is the struct which is going to be used by all other repositories in the gotransip package

Jump to

Keyboard shortcuts

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