client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client  http.Client
	URL     url.URL
	Headers http.Header
}

func NewClient

func NewClient(url url.URL, rt http.RoundTripper) *Client

func (*Client) AddArticleToTicket

func (c *Client) AddArticleToTicket(ctx context.Context, article zammad.Article) error

AddArticleToTicket adds an article to an existing ticket

func (*Client) CreateTicket

func (c *Client) CreateTicket(ctx context.Context, ticket zammad.NewTicket) error

CreateTicket create a new ticket in Zammad

func (*Client) SearchTickets

func (c *Client) SearchTickets(ctx context.Context, hostname, service string) ([]zammad.Ticket, error)

SearchTickets searches tickets for the given hostname and service. If only the hostname is provided all tickets with this hostname are returned, if a service is provided only tickets with matching service and hostname are returned.

func (*Client) UpdateTicketState

func (c *Client) UpdateTicketState(ctx context.Context, ticket zammad.Ticket, state zammad.TicketState) error

UpdateTicketState updates the ticket to the given state

Jump to

Keyboard shortcuts

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