zelda

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	ID             *string  `json:"id,omitempty"`
	LongURL        string   `json:"long_url"`
	Domain         string   `json:"domain"`
	Code           *string  `json:"code,omitempty"`
	Title          *string  `json:"title,omitempty"`
	Tags           []string `json:"tags,omitempty"`
	OrganizationID string   `json:"organizationId,omitempty"` // DEVNOTE: The API is inconsistent and expecting organizationId, not organizaiton_id (unfortunately)
}

type DomainInfo

type DomainInfo struct {
	ID        string     `json:"id"`
	Domain    string     `json:"domain"`
	Status    string     `json:"status"`
	DNSStatus string     `json:"dnsStatus"`
	SSLStatus string     `json:"sslStatus"`
	CreatedAt *time.Time `json:"createdAt"`
}

type MockZeldaService

type MockZeldaService struct {
	mock.Mock
}

MockZeldaService is a mock implementation of the ZeldaServicer interface

func NewMockZeldaService

func NewMockZeldaService() *MockZeldaService

NewMockZeldaService creates a new instance of MockZeldaService

func (*MockZeldaService) CreateCode

func (m *MockZeldaService) CreateCode(organizationID string, code Code) (Code, error)

CreateCode mocks the CreateCode method

func (*MockZeldaService) CreateQRCode

func (m *MockZeldaService) CreateQRCode(organizationID, codeId, title string) (QR, error)

CreateQRCode mocks the CreateQRCode method

func (*MockZeldaService) ListDomains

func (m *MockZeldaService) ListDomains(organizationID string, pageSize, pageNum int) ([]DomainInfo, error)

ListDomains mocks the ListDomains method

type QR

type QR struct {
	ID     string `json:"id"`
	Title  string `json:"title"`
	QRCode string `json:"qrCode"`
	QRLink string `json:"qrLink"`
}

type ZeldaService

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

func NewService

func NewService() *ZeldaService

func (*ZeldaService) CreateCode

func (zs *ZeldaService) CreateCode(organizationID string, code Code) (Code, error)

func (*ZeldaService) CreateQRCode

func (zs *ZeldaService) CreateQRCode(organizationID, codeId string) (QR, error)

func (*ZeldaService) ListDomains

func (zs *ZeldaService) ListDomains(organizationID string, pageSize, pageNum int) ([]DomainInfo, error)

type ZeldaServicer

type ZeldaServicer interface {
	CreateCode(organizationID string, code Code) (Code, error)
	CreateQRCode(organizationID, codeId string) (QR, error)
	ListDomains(organizationID string, pageSize, pageNum int) ([]DomainInfo, error)
}

Jump to

Keyboard shortcuts

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