sharedexchange

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	ID        int                 `json:"id"`
	Name      string              `json:"name"`
	Version   string              `json:"version"`
	CreatedAt connection.DateTime `json:"created_at"`
}

Domain represents an Shared Exchange domain

type DomainNotFoundError

type DomainNotFoundError struct {
	ID int
}

DomainNotFoundError indicates a domain was not found

func (*DomainNotFoundError) Error

func (e *DomainNotFoundError) Error() string

type Service

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

Service implements SharedExchangeService for managing the Shared Exchange service

func NewService

func NewService(connection connection.Connection) *Service

NewService returns a new instance of SharedExchangeService

func (*Service) GetDomain

func (s *Service) GetDomain(domainID int) (Domain, error)

GetDomain retrieves a single domain by id

func (*Service) GetDomains

func (s *Service) GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)

GetDomains retrieves a list of domains

func (*Service) GetDomainsPaginated

func (s *Service) GetDomainsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Domain], error)

GetDomainsPaginated retrieves a paginated list of domains

type SharedExchangeService

type SharedExchangeService interface {
	GetDomains(parameters connection.APIRequestParameters) ([]Domain, error)
	GetDomainsPaginated(parameters connection.APIRequestParameters) (*connection.Paginated[Domain], error)
	GetDomain(domainID int) (Domain, error)
}

SharedExchangeService is an interface for managing Shared Exchange

Jump to

Keyboard shortcuts

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