rhttp

package
v0.0.0-...-36d6306 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckOwnerHttp

func CheckOwnerHttp(ctx context.Context, hs shttp.HTTPService, us suser.UserService, httpID idwrap.IDWrap) (bool, error)

func CreateService

func CreateService(srv HttpServiceRPC, options []connect.HandlerOption) (*api.Service, error)

CreateService creates the HTTP service with Connect handler

Types

type AssertionResult

type AssertionResult struct {
	AssertionID idwrap.IDWrap
	Expression  string
	Success     bool
	Error       error
	EvaluatedAt time.Time
}

evaluateAndStoreAssertions loads assertions for an HTTP entry, evaluates them against the response, and stores the results AssertionResult represents the result of an assertion evaluation

type HttpAssertEvent

type HttpAssertEvent struct {
	Type       string
	IsDelta    bool
	Patch      patch.HTTPAssertPatch
	HttpAssert *httpv1.HttpAssert
}

HttpAssertEvent defines the event payload for HTTP assert streaming

type HttpAssertTopic

type HttpAssertTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpAssertTopic defines the streaming topic for HTTP assert events

type HttpBodyFormEvent

type HttpBodyFormEvent struct {
	Type         string
	IsDelta      bool
	Patch        patch.HTTPBodyFormPatch
	HttpBodyForm *httpv1.HttpBodyFormData
}

HttpBodyFormEvent defines the event payload for HTTP body form streaming

type HttpBodyFormTopic

type HttpBodyFormTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpBodyFormTopic defines the streaming topic for HTTP body form events

type HttpBodyRawEvent

type HttpBodyRawEvent struct {
	Type        string
	IsDelta     bool
	Patch       patch.HTTPBodyRawPatch
	HttpBodyRaw *httpv1.HttpBodyRaw
}

HttpBodyRawEvent defines the event payload for HTTP body raw streaming

type HttpBodyRawTopic

type HttpBodyRawTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpBodyRawTopic defines the streaming topic for HTTP body raw events

type HttpBodyUrlEncodedEvent

type HttpBodyUrlEncodedEvent struct {
	Type               string
	IsDelta            bool
	Patch              patch.HTTPBodyUrlEncodedPatch
	HttpBodyUrlEncoded *httpv1.HttpBodyUrlEncoded
}

HttpBodyUrlEncodedEvent defines the event payload for HTTP body URL encoded streaming

type HttpBodyUrlEncodedTopic

type HttpBodyUrlEncodedTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpBodyUrlEncodedTopic defines the streaming topic for HTTP body URL encoded events

type HttpEvent

type HttpEvent struct {
	Type    string
	IsDelta bool
	Patch   patch.HTTPDeltaPatch
	Http    *httpv1.Http
}

HttpEvent defines the event payload for HTTP streaming

type HttpHeaderEvent

type HttpHeaderEvent struct {
	Type       string
	IsDelta    bool
	Patch      patch.HTTPHeaderPatch
	HttpHeader *httpv1.HttpHeader
}

HttpHeaderEvent defines the event payload for HTTP header streaming

type HttpHeaderTopic

type HttpHeaderTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpHeaderTopic defines the streaming topic for HTTP header events

type HttpResponseAssertEvent

type HttpResponseAssertEvent struct {
	Type               string
	HttpResponseAssert *httpv1.HttpResponseAssert
}

HttpResponseAssertEvent defines the event payload for HTTP response assert streaming

type HttpResponseAssertTopic

type HttpResponseAssertTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpResponseAssertTopic defines the streaming topic for HTTP response assert events

type HttpResponseEvent

type HttpResponseEvent struct {
	Type         string
	HttpResponse *httpv1.HttpResponse
}

HttpResponseEvent defines the event payload for HTTP response streaming

type HttpResponseHeaderEvent

type HttpResponseHeaderEvent struct {
	Type               string
	HttpResponseHeader *httpv1.HttpResponseHeader
}

HttpResponseHeaderEvent defines the event payload for HTTP response header streaming

type HttpResponseHeaderTopic

type HttpResponseHeaderTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpResponseHeaderTopic defines the streaming topic for HTTP response header events

type HttpResponseTopic

type HttpResponseTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpResponseTopic defines the streaming topic for HTTP response events

type HttpSearchParamEvent

type HttpSearchParamEvent struct {
	Type            string
	IsDelta         bool
	Patch           patch.HTTPSearchParamPatch
	HttpSearchParam *httpv1.HttpSearchParam
}

HttpSearchParamEvent defines the event payload for HTTP search param streaming

type HttpSearchParamTopic

type HttpSearchParamTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpSearchParamTopic defines the streaming topic for HTTP search param events

type HttpServiceRPC

type HttpServiceRPC struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

HttpServiceRPC handles HTTP RPC operations with streaming support

func New

New creates a new HttpServiceRPC instance

func (*HttpServiceRPC) HttpAssertCollection

func (*HttpServiceRPC) HttpAssertDelete

func (*HttpServiceRPC) HttpAssertDeltaCollection

streamHttpHeaderDeltaSync streams HTTP header delta events to the client

func (*HttpServiceRPC) HttpAssertDeltaDelete

func (*HttpServiceRPC) HttpAssertDeltaInsert

func (*HttpServiceRPC) HttpAssertDeltaSync

func (*HttpServiceRPC) HttpAssertDeltaUpdate

func (*HttpServiceRPC) HttpAssertInsert

func (*HttpServiceRPC) HttpAssertSync

func (*HttpServiceRPC) HttpAssertUpdate

func (*HttpServiceRPC) HttpBodyFormDataDelete

func (*HttpServiceRPC) HttpBodyFormDataDeltaCollection

streamHttpBodyFormDeltaSync streams HTTP body form delta events to the client

func (*HttpServiceRPC) HttpBodyFormDataDeltaSync

func (*HttpServiceRPC) HttpBodyFormDataInsert

func (*HttpServiceRPC) HttpBodyFormDataSync

func (*HttpServiceRPC) HttpBodyFormDataUpdate

func (*HttpServiceRPC) HttpBodyRawDeltaCollection

streamHttpBodyUrlEncodedSync streams HTTP body URL encoded events to the client

func (*HttpServiceRPC) HttpBodyRawDeltaDelete

func (*HttpServiceRPC) HttpBodyRawDeltaInsert

func (*HttpServiceRPC) HttpBodyRawDeltaSync

func (*HttpServiceRPC) HttpBodyRawDeltaUpdate

func (*HttpServiceRPC) HttpBodyRawInsert

func (*HttpServiceRPC) HttpBodyRawSync

func (*HttpServiceRPC) HttpBodyRawUpdate

func (*HttpServiceRPC) HttpBodyUrlEncodedDeltaCollection

HttpBodyUrlEncodedDeltaCollection returns all body URL encoded deltas

func (*HttpServiceRPC) HttpBodyUrlEncodedDeltaSync

func (*HttpServiceRPC) HttpBodyUrlEncodedSync

func (*HttpServiceRPC) HttpCollection

func (*HttpServiceRPC) HttpDelete

func (*HttpServiceRPC) HttpDeltaCollection

func (*HttpServiceRPC) HttpDeltaDelete

func (*HttpServiceRPC) HttpDeltaInsert

func (*HttpServiceRPC) HttpDeltaSync

func (*HttpServiceRPC) HttpDeltaUpdate

func (*HttpServiceRPC) HttpDuplicate

func (*HttpServiceRPC) HttpHeaderCollection

func (*HttpServiceRPC) HttpHeaderDelete

func (*HttpServiceRPC) HttpHeaderDeltaDelete

func (*HttpServiceRPC) HttpHeaderDeltaInsert

func (*HttpServiceRPC) HttpHeaderDeltaSync

func (*HttpServiceRPC) HttpHeaderDeltaUpdate

func (*HttpServiceRPC) HttpHeaderInsert

func (*HttpServiceRPC) HttpHeaderSync

func (*HttpServiceRPC) HttpHeaderUpdate

func (*HttpServiceRPC) HttpInsert

func (*HttpServiceRPC) HttpResponseAssertSync

func (*HttpServiceRPC) HttpResponseHeaderSync

func (*HttpServiceRPC) HttpResponseSync

func (*HttpServiceRPC) HttpRun

func (*HttpServiceRPC) HttpSearchParamDelete

func (*HttpServiceRPC) HttpSearchParamDeltaSync

func (*HttpServiceRPC) HttpSearchParamInsert

func (*HttpServiceRPC) HttpSearchParamSync

func (*HttpServiceRPC) HttpSearchParamUpdate

func (*HttpServiceRPC) HttpSync

func (*HttpServiceRPC) HttpUpdate

func (*HttpServiceRPC) HttpVersionSync

func (*HttpServiceRPC) MutationPublisher

func (s *HttpServiceRPC) MutationPublisher() mutation.Publisher

MutationPublisher returns a unified publisher for HTTP-related mutation events. Exported so other services (e.g. the workspace importer) can dispatch HTTP sync events through the same machinery.

type HttpServiceRPCDeps

type HttpServiceRPCDeps struct {
	DB        *sql.DB
	Readers   HttpServiceRPCReaders
	Services  HttpServiceRPCServices
	Resolver  resolver.RequestResolver
	Streamers *HttpStreamers
}

func (*HttpServiceRPCDeps) Validate

func (d *HttpServiceRPCDeps) Validate() error

type HttpServiceRPCReaders

type HttpServiceRPCReaders struct {
	Http      *shttp.Reader
	User      *sworkspace.UserReader
	Workspace *sworkspace.WorkspaceReader
}

func (*HttpServiceRPCReaders) Validate

func (r *HttpServiceRPCReaders) Validate() error

type HttpServiceRPCServices

type HttpServiceRPCServices struct {
	Http               shttp.HTTPService
	User               suser.UserService
	Workspace          sworkspace.WorkspaceService
	WorkspaceUser      sworkspace.UserService
	Env                senv.EnvService
	Variable           senv.VariableService
	HttpBodyRaw        *shttp.HttpBodyRawService
	HttpHeader         shttp.HttpHeaderService
	HttpSearchParam    *shttp.HttpSearchParamService
	HttpBodyForm       *shttp.HttpBodyFormService
	HttpBodyUrlEncoded *shttp.HttpBodyUrlEncodedService
	HttpAssert         *shttp.HttpAssertService
	HttpResponse       shttp.HttpResponseService
	File               *sfile.FileService
}

func (*HttpServiceRPCServices) Validate

func (s *HttpServiceRPCServices) Validate() error

type HttpTopic

type HttpTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpTopic defines the streaming topic for HTTP events

type HttpVersionEvent

type HttpVersionEvent struct {
	Type        string
	HttpVersion *httpv1.HttpVersion
}

HttpVersionEvent defines the event payload for HTTP version streaming

type HttpVersionTopic

type HttpVersionTopic struct {
	WorkspaceID idwrap.IDWrap
}

HttpVersionTopic defines the streaming topic for HTTP version events

Jump to

Keyboard shortcuts

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