tmfservice

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tmfservice provides a client for interacting with TMF (TM Forum) APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TMFClient

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

TMFClient is a client for the TMForum API.

func NewClient

func NewClient(config *TMFClientConfig) (*TMFClient, error)

NewClient creates a new client.

func (*TMFClient) Delete

func (c *TMFClient) Delete(path string, headers map[string]string) (*http.Response, error)

Delete sends a DELETE request to the remote server.

func (*TMFClient) Get

func (c *TMFClient) Get(path string, headers map[string]string) (*http.Response, error)

Get sends a GET request to the remote server.

func (*TMFClient) GetList

func (c *TMFClient) GetList(path string, headers map[string]string) ([]TMFObject, error)

func (*TMFClient) Patch

func (c *TMFClient) Patch(path string, body []byte, headers map[string]string) (*http.Response, error)

Patch sends a PATCH request to the remote server.

func (*TMFClient) Post

func (c *TMFClient) Post(path string, body []byte, headers map[string]string) (*http.Response, error)

Post sends a POST request to the remote server.

type TMFClientConfig

type TMFClientConfig struct {
	// BaseURL of the remote TMForum server
	BaseURL string `json:"base_url" yaml:"base_url"`

	// Timeout in seconds for HTTP requests
	Timeout int `json:"timeout" yaml:"timeout"`
}

TMFClientConfig holds the configuration for the tmfclient package

type TMFObject

type TMFObject map[string]any

Jump to

Keyboard shortcuts

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