Documentation
¶
Index ¶
- func GetLinkByRel(rel string, links []base.Link) string
- func GetLinkMap(links []base.Link) map[string]string
- func GetLinkedObjectName(rel string, links []base.Link) string
- type DataServiceClient
- func (c *DataServiceClient) DelHeader(key string)
- func (c *DataServiceClient) Delete(resource string) (*http.Response, error)
- func (c *DataServiceClient) DeleteWithContext(ctx context.Context, resource string) (*http.Response, error)
- func (c *DataServiceClient) Do(request *http.Request, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) Get(resource string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) GetHeader(key string) string
- func (c *DataServiceClient) GetWithContext(ctx context.Context, resource string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) Options(resource string) (*http.Response, error)
- func (c *DataServiceClient) Patch(resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PatchJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PatchWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) Post(resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PostJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PostWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) Put(resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PutJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) PutWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
- func (c *DataServiceClient) Request(method string, resource string, requestBody string) (*http.Request, error)
- func (c *DataServiceClient) RequestWithContext(ctx context.Context, method string, resource string, requestBody string) (*http.Request, error)
- func (c *DataServiceClient) SetHeader(key string, value string)
- func (c *DataServiceClient) SetToken(token string)
- type ListIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataServiceClient ¶
type DataServiceClient struct {
// contains filtered or unexported fields
}
func NewCustomClient ¶
func (*DataServiceClient) DelHeader ¶
func (c *DataServiceClient) DelHeader(key string)
func (*DataServiceClient) Delete ¶
func (c *DataServiceClient) Delete(resource string) (*http.Response, error)
func (*DataServiceClient) DeleteWithContext ¶
func (c *DataServiceClient) DeleteWithContext(ctx context.Context, resource string) (*http.Response, error)
DeleteWithContext performs a DELETE request with context support.
func (*DataServiceClient) GetHeader ¶
func (c *DataServiceClient) GetHeader(key string) string
func (*DataServiceClient) GetWithContext ¶
func (c *DataServiceClient) GetWithContext(ctx context.Context, resource string, responseBodyOut any) (*http.Response, error)
GetWithContext performs a GET request with context support.
func (*DataServiceClient) Options ¶
func (c *DataServiceClient) Options(resource string) (*http.Response, error)
func (*DataServiceClient) PatchJSONWithContext ¶
func (c *DataServiceClient) PatchJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
PatchJSONWithContext marshals body to JSON and performs PATCH with context.
func (*DataServiceClient) PatchWithContext ¶
func (c *DataServiceClient) PatchWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
PatchWithContext performs a PATCH request with context support.
func (*DataServiceClient) PostJSONWithContext ¶
func (c *DataServiceClient) PostJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
PostJSONWithContext marshals body to JSON and performs POST with context.
func (*DataServiceClient) PostWithContext ¶
func (c *DataServiceClient) PostWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
PostWithContext performs a POST request with context support.
func (*DataServiceClient) PutJSONWithContext ¶
func (c *DataServiceClient) PutJSONWithContext(ctx context.Context, resource string, body any, responseBodyOut any) (*http.Response, error)
PutJSONWithContext marshals body to JSON and performs PUT with context.
func (*DataServiceClient) PutWithContext ¶
func (c *DataServiceClient) PutWithContext(ctx context.Context, resource string, requestBody string, responseBodyOut any) (*http.Response, error)
PutWithContext performs a PUT request with context support.
func (*DataServiceClient) RequestWithContext ¶
func (c *DataServiceClient) RequestWithContext(ctx context.Context, method string, resource string, requestBody string) (*http.Request, error)
RequestWithContext creates a request with context support.
func (*DataServiceClient) SetHeader ¶
func (c *DataServiceClient) SetHeader(key string, value string)
func (*DataServiceClient) SetToken ¶
func (c *DataServiceClient) SetToken(token string)
type ListIterator ¶
type ListIterator[T any] struct { // contains filtered or unexported fields }
func NewListIterator ¶
func NewListIterator[T any](client *DataServiceClient, url string) *ListIterator[T]
func (*ListIterator[T]) Error ¶
func (i *ListIterator[T]) Error() error
func (*ListIterator[T]) Item ¶
func (i *ListIterator[T]) Item() T
func (*ListIterator[T]) List ¶
func (i *ListIterator[T]) List() ([]T, error)
func (*ListIterator[T]) Next ¶
func (i *ListIterator[T]) Next() bool
func (*ListIterator[T]) VisitAll ¶
func (i *ListIterator[T]) VisitAll(handler func(t T) error) ([]T, error)
Click to show internal directories.
Click to hide internal directories.