apimodels

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package apimodels holds the request payload types for the api HTTP API. They are shared between the server-side handlers and the api-backed service.Service client (remotesvc) so the wire contract stays in one place.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSRecordsCreateRequest

type DNSRecordsCreateRequest struct {
	PayloadName string                    `json:"payloadName"`
	Name        string                    `json:"name"`
	TTL         int                       `json:"ttl"`
	Type        service.DNSRecordType     `json:"type"`
	Values      []string                  `json:"values"`
	Strategy    service.DNSRecordStrategy `json:"strategy"`
}

type HTTPRoutesCreateRequest

type HTTPRoutesCreateRequest struct {
	PayloadName string              `json:"payloadName"`
	Method      service.HTTPMethod  `json:"method"`
	Path        string              `json:"path"`
	Code        int                 `json:"code"`
	Headers     map[string][]string `json:"headers"`
	Body        string              `json:"body"`
	IsDynamic   bool                `json:"isDynamic"`
}

type HTTPRoutesUpdateRequest

type HTTPRoutesUpdateRequest struct {
	Method    *service.HTTPMethod `json:"method"`
	Path      *string             `json:"path"`
	Code      *int                `json:"code"`
	Headers   map[string][]string `json:"headers"`
	Body      *string             `json:"body"`
	IsDynamic *bool               `json:"isDynamic"`
}

type PayloadsCreateRequest

type PayloadsCreateRequest struct {
	Name            string                  `json:"name"`
	NotifyProtocols []service.ProtoCategory `json:"notifyProtocols"`
	StoreEvents     bool                    `json:"storeEvents"`
}

type PayloadsUpdateRequest

type PayloadsUpdateRequest struct {
	Name            string                  `json:"name"`
	NotifyProtocols []service.ProtoCategory `json:"notifyProtocols,omitempty"`
	StoreEvents     *bool                   `json:"storeEvents"`
}

type UsersCreateRequest

type UsersCreateRequest struct {
	Name       string  `json:"name"`
	APIToken   *string `json:"apiToken"`
	TelegramID *int64  `json:"telegramId"`
	LarkID     *string `json:"larkId"`
	SlackID    *string `json:"slackId"`
	IsAdmin    bool    `json:"isAdmin"`
}

Jump to

Keyboard shortcuts

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