action

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const ANONYMOUS_OWNER = "anonymous"

Variables

This section is empty.

Functions

func ToRequestNodes

func ToRequestNodes(nodes []NodeRequest) []domain.NodeReference

Types

type NodeRequest

type NodeRequest struct {
	Order   int     `json:"order"`
	Request Request `json:"request"`
}

type NodeRequestLite

type NodeRequestLite struct {
	Order   int         `json:"order"`
	Request RequestLite `json:"request"`
}

func ToNodeRequestLite

func ToNodeRequestLite(requests []NodeRequest) []NodeRequestLite

type RepositoryRequest

type RepositoryRequest interface {
	Find(id string) (*Request, bool)
	FindMany(ids ...string) []Request
	FindNodes(references []domain.NodeReference) []NodeRequest
	Insert(owner string, request *Request) *Request
	InsertMany(owner string, requests []Request) []Request
	Delete(request *Request) *Request
	DeleteMany(requests ...Request) []Request
}

type RepositoryResponse

type RepositoryResponse interface {
	Find(key string) (*Response, bool)
	FindMany(ids []string) []Response
	Insert(owner string, response *Response) *Response
	Delete(response *Response) *Response
	DeleteMany(responses ...Response) []Response
}

type Request

type Request struct {
	Id        string               `json:"_id"`
	Timestamp int64                `json:"timestamp"`
	Name      string               `json:"name"`
	Method    domain.HttpMethod    `json:"method"`
	Uri       string               `json:"uri"`
	Query     query.Queries        `json:"query"`
	Header    header.Headers       `json:"header"`
	Cookie    cookie.CookiesClient `json:"cookie"`
	Body      body.BodyRequest     `json:"body"`
	Auth      auth.Auths           `json:"auth"`
	Owner     string               `json:"owner"`
	Modified  int64                `json:"modified"`
	Status    StatusRequest        `json:"status"`
}

func NewRequest

func NewRequest(name string, method domain.HttpMethod, uri string) *Request

func NewRequestEmpty

func NewRequestEmpty() *Request

func (Request) PersistenceId

func (r Request) PersistenceId() string

type RequestLite

type RequestLite struct {
	Id        string            `json:"_id"`
	Timestamp int64             `json:"timestamp"`
	Name      string            `json:"name"`
	Method    domain.HttpMethod `json:"method"`
	Uri       string            `json:"uri"`
	Owner     string            `json:"owner"`
	Modified  int64             `json:"modified"`
}

func ToLiteRequest

func ToLiteRequest(request *Request) *RequestLite

type Response

type Response struct {
	Id        string               `json:"_id"`
	Timestamp int64                `json:"timestamp"`
	Request   string               `json:"request"`
	Date      int64                `json:"date"`
	Time      int64                `json:"time"`
	Status    int16                `json:"status"`
	Headers   header.Headers       `json:"headers"`
	Cookies   cookie.CookiesServer `json:"cookies"`
	Body      body.BodyResponse    `json:"body"`
	Size      int                  `json:"size"`
	Owner     string               `json:"owner"`
}

func NewResponseDefault

func NewResponseDefault() *Response

func (Response) PersistenceId

func (r Response) PersistenceId() string

type StatusRequest

type StatusRequest string
const (
	DRAFT StatusRequest = "draft"
	FINAL StatusRequest = "final"
	GROUP StatusRequest = "group"
)

func StatusRequestFromString

func StatusRequestFromString(value string) (*StatusRequest, error)

func (StatusRequest) String

func (s StatusRequest) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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