shttp

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoHTTPFound = sql.ErrNoRows
View Source
var ErrNoHttpAssertFound = errors.New("no http assert found")
View Source
var ErrNoHttpBodyFormFound = errors.New("no http body form found")
View Source
var ErrNoHttpBodyRawFound = errors.New("no HTTP body raw found")
View Source
var ErrNoHttpBodyUrlEncodedFound = errors.New("no http body url encoded found")
View Source
var ErrNoHttpHeaderFound = errors.New("no http header found")
View Source
var ErrNoHttpResponseFound = errors.New("no HTTP response found")
View Source
var ErrNoHttpSearchParamFound = errors.New("no HttpSearchParam found")

Functions

func ConvertToDBHTTP

func ConvertToDBHTTP(http mhttp.HTTP) gen.Http

func ConvertToDBHttpBodyRaw

func ConvertToDBHttpBodyRaw(body mhttp.HTTPBodyRaw) gen.HttpBodyRaw

func ConvertToDBHttpResponse

func ConvertToDBHttpResponse(response mhttp.HTTPResponse) gen.HttpResponse

func ConvertToModelHTTP

func ConvertToModelHTTP(http gen.Http) *mhttp.HTTP

func ConvertToModelHttpBodyRaw

func ConvertToModelHttpBodyRaw(dbBody gen.HttpBodyRaw) mhttp.HTTPBodyRaw

func ConvertToModelHttpResponse

func ConvertToModelHttpResponse(response gen.HttpResponse) mhttp.HTTPResponse

func ConvertToModelHttpVersion

func ConvertToModelHttpVersion(version gen.HttpVersion) *mhttp.HttpVersion

ConvertToModelHttpVersion converts DB HttpVersion to model HttpVersion

func DeserializeAssertGenToModel

func DeserializeAssertGenToModel(assert gen.HttpAssert) mhttp.HTTPAssert

func DeserializeBodyFormGenToModel

func DeserializeBodyFormGenToModel(row gen.GetHTTPBodyFormsRow) mhttp.HTTPBodyForm

func DeserializeBodyUrlEncodedGenToModel

func DeserializeBodyUrlEncodedGenToModel(body gen.HttpBodyUrlencoded) mhttp.HTTPBodyUrlencoded

func DeserializeHeaderGenToModel

func DeserializeHeaderGenToModel(header gen.HttpHeader) mhttp.HTTPHeader

DeserializeHeaderGenToModel converts DB HttpHeader to model HTTPHeader

func DeserializeSearchParamGenToModel

func DeserializeSearchParamGenToModel(dbParam gen.GetHTTPSearchParamsRow) mhttp.HTTPSearchParam

func SerializeAssertModelToGen

func SerializeAssertModelToGen(assert mhttp.HTTPAssert) gen.HttpAssert

func SerializeBodyFormModelToGen

func SerializeBodyFormModelToGen(body mhttp.HTTPBodyForm) gen.HttpBodyForm

func SerializeBodyUrlEncodedModelToGen

func SerializeBodyUrlEncodedModelToGen(body mhttp.HTTPBodyUrlencoded) gen.HttpBodyUrlencoded

func SerializeHeaderModelToGen

func SerializeHeaderModelToGen(header mhttp.HTTPHeader) gen.HttpHeader

SerializeHeaderModelToGen converts model HTTPHeader to DB HttpHeader

func SerializeSearchParamModelToGen

func SerializeSearchParamModelToGen(param mhttp.HTTPSearchParam) gen.CreateHTTPSearchParamParams

Types

type AssertReader

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

func NewAssertReader

func NewAssertReader(db *sql.DB) *AssertReader

func NewAssertReaderFromQueries

func NewAssertReaderFromQueries(queries *gen.Queries) *AssertReader

func (*AssertReader) GetByHttpID

func (r *AssertReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

func (*AssertReader) GetByHttpIDOrdered

func (r *AssertReader) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

func (*AssertReader) GetByHttpIDs

func (r *AssertReader) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPAssert, error)

func (*AssertReader) GetByID

func (r *AssertReader) GetByID(ctx context.Context, id idwrap.IDWrap) (*mhttp.HTTPAssert, error)

func (*AssertReader) GetByIDs

func (r *AssertReader) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

type AssertWriter

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

func NewAssertWriter

func NewAssertWriter(tx gen.DBTX) *AssertWriter

func NewAssertWriterFromQueries

func NewAssertWriterFromQueries(queries *gen.Queries) *AssertWriter

func (*AssertWriter) Create

func (w *AssertWriter) Create(ctx context.Context, assert *mhttp.HTTPAssert) error

func (*AssertWriter) CreateBulk

func (w *AssertWriter) CreateBulk(ctx context.Context, asserts []mhttp.HTTPAssert) error

func (*AssertWriter) Delete

func (w *AssertWriter) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*AssertWriter) DeleteByHttpID

func (w *AssertWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*AssertWriter) ResetDelta

func (w *AssertWriter) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*AssertWriter) Update

func (w *AssertWriter) Update(ctx context.Context, assert *mhttp.HTTPAssert) error

func (*AssertWriter) UpdateDelta

func (w *AssertWriter) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

func (*AssertWriter) UpdateOrder

func (w *AssertWriter) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float32) error

type BodyFormReader

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

func NewBodyFormReader

func NewBodyFormReader(db *sql.DB) *BodyFormReader

func NewBodyFormReaderFromQueries

func NewBodyFormReaderFromQueries(queries *gen.Queries) *BodyFormReader

func (*BodyFormReader) GetByHttpID

func (r *BodyFormReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*BodyFormReader) GetByHttpIDOrdered

func (r *BodyFormReader) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*BodyFormReader) GetByHttpIDs

func (r *BodyFormReader) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPBodyForm, error)

func (*BodyFormReader) GetByID

func (*BodyFormReader) GetByIDs

func (r *BodyFormReader) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*BodyFormReader) GetStreaming

func (r *BodyFormReader) GetStreaming(ctx context.Context, httpIDs []idwrap.IDWrap, updatedAt int64) ([]gen.GetHTTPBodyFormStreamingRow, error)

type BodyFormWriter

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

func NewBodyFormWriter

func NewBodyFormWriter(tx gen.DBTX) *BodyFormWriter

func NewBodyFormWriterFromQueries

func NewBodyFormWriterFromQueries(queries *gen.Queries) *BodyFormWriter

func (*BodyFormWriter) Create

func (w *BodyFormWriter) Create(ctx context.Context, body *mhttp.HTTPBodyForm) error

func (*BodyFormWriter) CreateBulk

func (w *BodyFormWriter) CreateBulk(ctx context.Context, bodyForms []mhttp.HTTPBodyForm) error

func (*BodyFormWriter) Delete

func (w *BodyFormWriter) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*BodyFormWriter) DeleteByHttpID

func (w *BodyFormWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*BodyFormWriter) ResetDelta

func (w *BodyFormWriter) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*BodyFormWriter) Update

func (w *BodyFormWriter) Update(ctx context.Context, body *mhttp.HTTPBodyForm) error

func (*BodyFormWriter) UpdateDelta

func (w *BodyFormWriter) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

func (*BodyFormWriter) UpdateOrder

func (w *BodyFormWriter) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float32) error

type BodyRawReader

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

func NewBodyRawReader

func NewBodyRawReader(db *sql.DB) *BodyRawReader

func NewBodyRawReaderFromQueries

func NewBodyRawReaderFromQueries(queries *gen.Queries) *BodyRawReader

func (*BodyRawReader) Get

func (*BodyRawReader) GetByHttpID

func (r *BodyRawReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) (*mhttp.HTTPBodyRaw, error)

type BodyRawWriter

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

func NewBodyRawWriter

func NewBodyRawWriter(tx gen.DBTX) *BodyRawWriter

func NewBodyRawWriterFromQueries

func NewBodyRawWriterFromQueries(queries *gen.Queries) *BodyRawWriter

func (*BodyRawWriter) Create

func (w *BodyRawWriter) Create(ctx context.Context, httpID idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*BodyRawWriter) CreateDelta

func (w *BodyRawWriter) CreateDelta(ctx context.Context, httpID idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*BodyRawWriter) CreateFull

func (w *BodyRawWriter) CreateFull(ctx context.Context, body *mhttp.HTTPBodyRaw) (*mhttp.HTTPBodyRaw, error)

func (*BodyRawWriter) Delete

func (w *BodyRawWriter) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*BodyRawWriter) DeleteByHttpID

func (w *BodyRawWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*BodyRawWriter) Update

func (w *BodyRawWriter) Update(ctx context.Context, id idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*BodyRawWriter) UpdateDelta

func (w *BodyRawWriter) UpdateDelta(ctx context.Context, id idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

type BodyUrlEncodedReader

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

func NewBodyUrlEncodedReader

func NewBodyUrlEncodedReader(db *sql.DB) *BodyUrlEncodedReader

func NewBodyUrlEncodedReaderFromQueries

func NewBodyUrlEncodedReaderFromQueries(queries *gen.Queries) *BodyUrlEncodedReader

func (*BodyUrlEncodedReader) GetByHttpID

func (*BodyUrlEncodedReader) GetByHttpIDOrdered

func (r *BodyUrlEncodedReader) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyUrlencoded, error)

func (*BodyUrlEncodedReader) GetByHttpIDs

func (r *BodyUrlEncodedReader) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPBodyUrlencoded, error)

func (*BodyUrlEncodedReader) GetByID

func (*BodyUrlEncodedReader) GetByIDs

type BodyUrlEncodedWriter

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

func NewBodyUrlEncodedWriter

func NewBodyUrlEncodedWriter(tx gen.DBTX) *BodyUrlEncodedWriter

func NewBodyUrlEncodedWriterFromQueries

func NewBodyUrlEncodedWriterFromQueries(queries *gen.Queries) *BodyUrlEncodedWriter

func (*BodyUrlEncodedWriter) Create

func (*BodyUrlEncodedWriter) CreateBulk

func (w *BodyUrlEncodedWriter) CreateBulk(ctx context.Context, bodyUrlEncodeds []mhttp.HTTPBodyUrlencoded) error

func (*BodyUrlEncodedWriter) Delete

func (*BodyUrlEncodedWriter) DeleteByHttpID

func (w *BodyUrlEncodedWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*BodyUrlEncodedWriter) ResetDelta

func (w *BodyUrlEncodedWriter) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*BodyUrlEncodedWriter) Update

func (*BodyUrlEncodedWriter) UpdateDelta

func (w *BodyUrlEncodedWriter) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

type HTTPService

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

func New

func New(queries *gen.Queries, logger *slog.Logger) HTTPService

func NewTX

func NewTX(ctx context.Context, tx *sql.Tx) (*HTTPService, error)

func NewWithWorkspaceUserService

func NewWithWorkspaceUserService(queries *gen.Queries, logger *slog.Logger, wus *sworkspace.UserService) HTTPService

func (HTTPService) CheckUserBelongsToHttp

func (hs HTTPService) CheckUserBelongsToHttp(ctx context.Context, httpID, userID idwrap.IDWrap) (bool, error)

func (HTTPService) Create

func (hs HTTPService) Create(ctx context.Context, http *mhttp.HTTP) error

func (HTTPService) CreateHttpVersion

func (hs HTTPService) CreateHttpVersion(ctx context.Context, httpID, createdBy idwrap.IDWrap, versionName, versionDescription string) (*mhttp.HttpVersion, error)

func (HTTPService) Delete

func (hs HTTPService) Delete(ctx context.Context, id idwrap.IDWrap) error

func (HTTPService) FindByURLAndMethod

func (hs HTTPService) FindByURLAndMethod(ctx context.Context, workspaceID idwrap.IDWrap, url, method string) (*mhttp.HTTP, error)

func (HTTPService) Get

func (hs HTTPService) Get(ctx context.Context, id idwrap.IDWrap) (*mhttp.HTTP, error)

func (HTTPService) GetAssertsByHttpID

func (hs HTTPService) GetAssertsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

GetAssertsByHttpID returns all asserts for a given HTTP ID

func (HTTPService) GetBodyFormsByHttpID

func (hs HTTPService) GetBodyFormsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

GetBodyFormsByHttpID returns all body forms for a given HTTP ID

func (HTTPService) GetBodyRawByHttpID

func (hs HTTPService) GetBodyRawByHttpID(ctx context.Context, httpID idwrap.IDWrap) (*mhttp.HTTPBodyRaw, error)

GetBodyRawByHttpID returns body raw for a given HTTP ID. Returns nil if not found.

func (HTTPService) GetBodyUrlEncodedByHttpID

func (hs HTTPService) GetBodyUrlEncodedByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyUrlencoded, error)

GetBodyUrlEncodedByHttpID returns all body url encoded for a given HTTP ID

func (HTTPService) GetByWorkspaceID

func (hs HTTPService) GetByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (HTTPService) GetDeltasByParentID

func (hs HTTPService) GetDeltasByParentID(ctx context.Context, parentID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (HTTPService) GetDeltasByWorkspaceID

func (hs HTTPService) GetDeltasByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (HTTPService) GetHeadersByHttpID

func (hs HTTPService) GetHeadersByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

GetHeadersByHttpID returns all headers for a given HTTP ID

func (HTTPService) GetHttpVersionsByHttpID

func (hs HTTPService) GetHttpVersionsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HttpVersion, error)

func (HTTPService) GetSearchParamsByHttpID

func (hs HTTPService) GetSearchParamsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPSearchParam, error)

GetSearchParamsByHttpID returns all search params for a given HTTP ID

func (HTTPService) GetSnapshotsByWorkspaceID

func (hs HTTPService) GetSnapshotsByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (HTTPService) GetWorkspaceID

func (hs HTTPService) GetWorkspaceID(ctx context.Context, id idwrap.IDWrap) (idwrap.IDWrap, error)

func (HTTPService) Reader

func (hs HTTPService) Reader() *Reader

func (HTTPService) TX

func (hs HTTPService) TX(tx *sql.Tx) HTTPService

func (HTTPService) Update

func (hs HTTPService) Update(ctx context.Context, http *mhttp.HTTP) error

func (HTTPService) Upsert

func (hs HTTPService) Upsert(ctx context.Context, http *mhttp.HTTP) error

type HeaderReader

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

func NewHeaderReader

func NewHeaderReader(db *sql.DB) *HeaderReader

func NewHeaderReaderFromQueries

func NewHeaderReaderFromQueries(queries *gen.Queries) *HeaderReader

func (*HeaderReader) GetByHttpID

func (r *HeaderReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

func (*HeaderReader) GetByHttpIDOrdered

func (r *HeaderReader) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

func (*HeaderReader) GetByID

func (r *HeaderReader) GetByID(ctx context.Context, headerID idwrap.IDWrap) (mhttp.HTTPHeader, error)

func (*HeaderReader) GetByIDs

func (r *HeaderReader) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

type HeaderWriter

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

func NewHeaderWriter

func NewHeaderWriter(tx gen.DBTX) *HeaderWriter

func NewHeaderWriterFromQueries

func NewHeaderWriterFromQueries(queries *gen.Queries) *HeaderWriter

func (*HeaderWriter) Create

func (w *HeaderWriter) Create(ctx context.Context, header *mhttp.HTTPHeader) error

func (*HeaderWriter) CreateBulk

func (w *HeaderWriter) CreateBulk(ctx context.Context, httpID idwrap.IDWrap, headers []mhttp.HTTPHeader) error

func (*HeaderWriter) Delete

func (w *HeaderWriter) Delete(ctx context.Context, headerID idwrap.IDWrap) error

func (*HeaderWriter) DeleteByHttpID

func (w *HeaderWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HeaderWriter) Update

func (w *HeaderWriter) Update(ctx context.Context, header *mhttp.HTTPHeader) error

func (*HeaderWriter) UpdateDelta

func (w *HeaderWriter) UpdateDelta(ctx context.Context, headerID idwrap.IDWrap, deltaKey, deltaValue, deltaDescription *string, deltaEnabled *bool, deltaOrder *float32) error

func (*HeaderWriter) UpdateOrder

func (w *HeaderWriter) UpdateOrder(ctx context.Context, headerID idwrap.IDWrap, displayOrder float64) error

type HttpAssertService

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

func NewHttpAssertService

func NewHttpAssertService(queries *gen.Queries) *HttpAssertService

func (*HttpAssertService) Create

func (s *HttpAssertService) Create(ctx context.Context, assert *mhttp.HTTPAssert) error

func (*HttpAssertService) CreateBulk

func (s *HttpAssertService) CreateBulk(ctx context.Context, asserts []mhttp.HTTPAssert) error

func (*HttpAssertService) Delete

func (s *HttpAssertService) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*HttpAssertService) DeleteByHttpID

func (s *HttpAssertService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HttpAssertService) GetByHttpID

func (s *HttpAssertService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

func (*HttpAssertService) GetByHttpIDOrdered

func (s *HttpAssertService) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

func (*HttpAssertService) GetByHttpIDs

func (s *HttpAssertService) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPAssert, error)

func (*HttpAssertService) GetByID

func (*HttpAssertService) GetByIDs

func (s *HttpAssertService) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPAssert, error)

func (*HttpAssertService) ResetDelta

func (s *HttpAssertService) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*HttpAssertService) TX

func (*HttpAssertService) Update

func (s *HttpAssertService) Update(ctx context.Context, assert *mhttp.HTTPAssert) error

func (*HttpAssertService) UpdateDelta

func (s *HttpAssertService) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

func (*HttpAssertService) UpdateOrder

func (s *HttpAssertService) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float32) error

type HttpBodyFormService

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

func NewHttpBodyFormService

func NewHttpBodyFormService(queries *gen.Queries) *HttpBodyFormService

func (*HttpBodyFormService) Create

func (*HttpBodyFormService) CreateBulk

func (s *HttpBodyFormService) CreateBulk(ctx context.Context, bodyForms []mhttp.HTTPBodyForm) error

func (*HttpBodyFormService) Delete

func (*HttpBodyFormService) DeleteByHttpID

func (s *HttpBodyFormService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HttpBodyFormService) GetByHttpID

func (s *HttpBodyFormService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*HttpBodyFormService) GetByHttpIDOrdered

func (s *HttpBodyFormService) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*HttpBodyFormService) GetByHttpIDs

func (s *HttpBodyFormService) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPBodyForm, error)

func (*HttpBodyFormService) GetByID

func (*HttpBodyFormService) GetByIDs

func (s *HttpBodyFormService) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPBodyForm, error)

func (*HttpBodyFormService) GetStreaming

func (s *HttpBodyFormService) GetStreaming(ctx context.Context, httpIDs []idwrap.IDWrap, updatedAt int64) ([]gen.GetHTTPBodyFormStreamingRow, error)

func (*HttpBodyFormService) ResetDelta

func (s *HttpBodyFormService) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*HttpBodyFormService) TX

func (*HttpBodyFormService) Update

func (*HttpBodyFormService) UpdateDelta

func (s *HttpBodyFormService) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

func (*HttpBodyFormService) UpdateOrder

func (s *HttpBodyFormService) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float32) error

type HttpBodyRawService

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

func NewHttpBodyRawService

func NewHttpBodyRawService(queries *gen.Queries) *HttpBodyRawService

func (*HttpBodyRawService) Create

func (s *HttpBodyRawService) Create(ctx context.Context, httpID idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*HttpBodyRawService) CreateDelta

func (s *HttpBodyRawService) CreateDelta(ctx context.Context, httpID idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*HttpBodyRawService) CreateFull

func (s *HttpBodyRawService) CreateFull(ctx context.Context, body *mhttp.HTTPBodyRaw) (*mhttp.HTTPBodyRaw, error)

func (*HttpBodyRawService) Delete

func (s *HttpBodyRawService) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*HttpBodyRawService) DeleteByHttpID

func (s *HttpBodyRawService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HttpBodyRawService) Get

func (*HttpBodyRawService) GetByHttpID

func (s *HttpBodyRawService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) (*mhttp.HTTPBodyRaw, error)

func (*HttpBodyRawService) Reader

func (s *HttpBodyRawService) Reader() *BodyRawReader

func (*HttpBodyRawService) TX

func (*HttpBodyRawService) Update

func (s *HttpBodyRawService) Update(ctx context.Context, id idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

func (*HttpBodyRawService) UpdateDelta

func (s *HttpBodyRawService) UpdateDelta(ctx context.Context, id idwrap.IDWrap, rawData []byte) (*mhttp.HTTPBodyRaw, error)

type HttpBodyUrlEncodedService

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

func NewHttpBodyUrlEncodedService

func NewHttpBodyUrlEncodedService(queries *gen.Queries) *HttpBodyUrlEncodedService

func (*HttpBodyUrlEncodedService) Create

func (*HttpBodyUrlEncodedService) CreateBulk

func (s *HttpBodyUrlEncodedService) CreateBulk(ctx context.Context, bodyUrlEncodeds []mhttp.HTTPBodyUrlencoded) error

func (*HttpBodyUrlEncodedService) Delete

func (*HttpBodyUrlEncodedService) DeleteByHttpID

func (s *HttpBodyUrlEncodedService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HttpBodyUrlEncodedService) GetByHttpID

func (*HttpBodyUrlEncodedService) GetByHttpIDOrdered

func (s *HttpBodyUrlEncodedService) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPBodyUrlencoded, error)

func (*HttpBodyUrlEncodedService) GetByHttpIDs

func (*HttpBodyUrlEncodedService) GetByID

func (*HttpBodyUrlEncodedService) GetByIDs

func (*HttpBodyUrlEncodedService) ResetDelta

func (*HttpBodyUrlEncodedService) TX

func (*HttpBodyUrlEncodedService) Update

func (*HttpBodyUrlEncodedService) UpdateDelta

func (s *HttpBodyUrlEncodedService) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float32) error

type HttpHeaderService

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

func NewHttpHeaderService

func NewHttpHeaderService(queries *gen.Queries) HttpHeaderService

func NewHttpHeaderServiceTX

func NewHttpHeaderServiceTX(ctx context.Context, tx *sql.Tx) (*HttpHeaderService, error)

func (HttpHeaderService) Create

func (h HttpHeaderService) Create(ctx context.Context, header *mhttp.HTTPHeader) error

func (HttpHeaderService) CreateBulk

func (h HttpHeaderService) CreateBulk(ctx context.Context, httpID idwrap.IDWrap, headers []mhttp.HTTPHeader) error

func (HttpHeaderService) Delete

func (h HttpHeaderService) Delete(ctx context.Context, headerID idwrap.IDWrap) error

func (HttpHeaderService) DeleteByHttpID

func (h HttpHeaderService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (HttpHeaderService) GetByHttpID

func (h HttpHeaderService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

func (HttpHeaderService) GetByHttpIDOrdered

func (h HttpHeaderService) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

func (HttpHeaderService) GetByID

func (h HttpHeaderService) GetByID(ctx context.Context, headerID idwrap.IDWrap) (mhttp.HTTPHeader, error)

func (HttpHeaderService) GetByIDs

func (h HttpHeaderService) GetByIDs(ctx context.Context, ids []idwrap.IDWrap) ([]mhttp.HTTPHeader, error)

func (HttpHeaderService) TX

func (HttpHeaderService) Update

func (h HttpHeaderService) Update(ctx context.Context, header *mhttp.HTTPHeader) error

func (HttpHeaderService) UpdateDelta

func (h HttpHeaderService) UpdateDelta(ctx context.Context, headerID idwrap.IDWrap, deltaKey, deltaValue, deltaDescription *string, deltaEnabled *bool, deltaOrder *float32) error

func (HttpHeaderService) UpdateOrder

func (h HttpHeaderService) UpdateOrder(ctx context.Context, headerID idwrap.IDWrap, displayOrder float64) error

type HttpResponseReader

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

func NewHttpResponseReader

func NewHttpResponseReader(db *sql.DB) *HttpResponseReader

func NewHttpResponseReaderFromQueries

func NewHttpResponseReaderFromQueries(queries *gen.Queries) *HttpResponseReader

func (*HttpResponseReader) Get

func (*HttpResponseReader) GetAssertsByHttpID

func (r *HttpResponseReader) GetAssertsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

func (*HttpResponseReader) GetAssertsByResponseID

func (r *HttpResponseReader) GetAssertsByResponseID(ctx context.Context, responseID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

func (*HttpResponseReader) GetAssertsByWorkspaceID

func (r *HttpResponseReader) GetAssertsByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

GetAssertsByWorkspaceID retrieves all HTTP response asserts for a given workspace

func (*HttpResponseReader) GetByHttpID

func (r *HttpResponseReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponse, error)

func (*HttpResponseReader) GetByWorkspaceID

func (r *HttpResponseReader) GetByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponse, error)

GetByWorkspaceID retrieves all HTTP responses for a given workspace by joining with the http table to filter by workspace_id. This is more efficient than the previous approach of iterating through all HTTP records in the workspace.

func (*HttpResponseReader) GetHeadersByHttpID

func (r *HttpResponseReader) GetHeadersByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

func (*HttpResponseReader) GetHeadersByResponseID

func (r *HttpResponseReader) GetHeadersByResponseID(ctx context.Context, responseID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

func (*HttpResponseReader) GetHeadersByWorkspaceID

func (r *HttpResponseReader) GetHeadersByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

GetHeadersByWorkspaceID retrieves all HTTP response headers for a given workspace

type HttpResponseService

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

func NewHttpResponseService

func NewHttpResponseService(queries *gen.Queries) HttpResponseService

func (HttpResponseService) Create

func (hrs HttpResponseService) Create(ctx context.Context, response mhttp.HTTPResponse) error

func (HttpResponseService) CreateAssert

func (hrs HttpResponseService) CreateAssert(ctx context.Context, assert mhttp.HTTPResponseAssert) error

func (HttpResponseService) CreateHeader

func (hrs HttpResponseService) CreateHeader(ctx context.Context, header mhttp.HTTPResponseHeader) error

func (HttpResponseService) Get

func (HttpResponseService) GetAssertsByHttpID

func (hrs HttpResponseService) GetAssertsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

func (HttpResponseService) GetAssertsByResponseID

func (hrs HttpResponseService) GetAssertsByResponseID(ctx context.Context, responseID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

func (HttpResponseService) GetAssertsByWorkspaceID

func (hrs HttpResponseService) GetAssertsByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponseAssert, error)

func (HttpResponseService) GetByHttpID

func (hrs HttpResponseService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponse, error)

func (HttpResponseService) GetByWorkspaceID

func (hrs HttpResponseService) GetByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponse, error)

func (HttpResponseService) GetHeadersByHttpID

func (hrs HttpResponseService) GetHeadersByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

func (HttpResponseService) GetHeadersByResponseID

func (hrs HttpResponseService) GetHeadersByResponseID(ctx context.Context, responseID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

func (HttpResponseService) GetHeadersByWorkspaceID

func (hrs HttpResponseService) GetHeadersByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTPResponseHeader, error)

func (HttpResponseService) Reader

func (HttpResponseService) TX

type HttpResponseWriter

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

func NewHttpResponseWriter

func NewHttpResponseWriter(tx gen.DBTX) *HttpResponseWriter

func NewHttpResponseWriterFromQueries

func NewHttpResponseWriterFromQueries(queries *gen.Queries) *HttpResponseWriter

func (*HttpResponseWriter) Create

func (w *HttpResponseWriter) Create(ctx context.Context, response mhttp.HTTPResponse) error

func (*HttpResponseWriter) CreateAssert

func (w *HttpResponseWriter) CreateAssert(ctx context.Context, assert mhttp.HTTPResponseAssert) error

func (*HttpResponseWriter) CreateHeader

func (w *HttpResponseWriter) CreateHeader(ctx context.Context, header mhttp.HTTPResponseHeader) error

type HttpSearchParamService

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

func NewHttpSearchParamService

func NewHttpSearchParamService(queries *gen.Queries) *HttpSearchParamService

func (*HttpSearchParamService) Create

func (*HttpSearchParamService) CreateBulk

func (s *HttpSearchParamService) CreateBulk(ctx context.Context, httpID idwrap.IDWrap, params []mhttp.HTTPSearchParam) error

func (*HttpSearchParamService) Delete

func (s *HttpSearchParamService) Delete(ctx context.Context, paramID idwrap.IDWrap) error

func (*HttpSearchParamService) DeleteByHttpID

func (s *HttpSearchParamService) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*HttpSearchParamService) GetByHttpID

func (s *HttpSearchParamService) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPSearchParam, error)

func (*HttpSearchParamService) GetByHttpIDOrdered

func (s *HttpSearchParamService) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPSearchParam, error)

func (*HttpSearchParamService) GetByHttpIDs

func (s *HttpSearchParamService) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPSearchParam, error)

func (*HttpSearchParamService) GetByID

func (*HttpSearchParamService) GetByIDs

func (*HttpSearchParamService) GetStreaming

func (s *HttpSearchParamService) GetStreaming(ctx context.Context, httpIDs []idwrap.IDWrap, updatedAt int64) ([]gen.GetHTTPSearchParamsStreamingRow, error)

func (*HttpSearchParamService) ResetDelta

func (s *HttpSearchParamService) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*HttpSearchParamService) TX

func (*HttpSearchParamService) Update

func (*HttpSearchParamService) UpdateDelta

func (s *HttpSearchParamService) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float64) error

func (*HttpSearchParamService) UpdateOrder

func (s *HttpSearchParamService) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float64) error

type Reader

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

func NewReader

func NewReader(db *sql.DB, logger *slog.Logger, wus *sworkspace.UserService) *Reader

func NewReaderFromQueries

func NewReaderFromQueries(queries *gen.Queries, logger *slog.Logger, wus *sworkspace.UserService) *Reader

func (*Reader) CheckUserBelongsToHttp

func (r *Reader) CheckUserBelongsToHttp(ctx context.Context, httpID, userID idwrap.IDWrap) (bool, error)

func (*Reader) FindByURLAndMethod

func (r *Reader) FindByURLAndMethod(ctx context.Context, workspaceID idwrap.IDWrap, url, method string) (*mhttp.HTTP, error)

func (*Reader) FindHTTPByContentHash

func (r *Reader) FindHTTPByContentHash(ctx context.Context, workspaceID idwrap.IDWrap, contentHash string) (idwrap.IDWrap, error)

func (*Reader) Get

func (r *Reader) Get(ctx context.Context, id idwrap.IDWrap) (*mhttp.HTTP, error)

func (*Reader) GetByWorkspaceID

func (r *Reader) GetByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (*Reader) GetDeltasByParentID

func (r *Reader) GetDeltasByParentID(ctx context.Context, parentID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (*Reader) GetDeltasByWorkspaceID

func (r *Reader) GetDeltasByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (*Reader) GetHttpVersionsByHttpID

func (r *Reader) GetHttpVersionsByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HttpVersion, error)

func (*Reader) GetSnapshotsByWorkspaceID

func (r *Reader) GetSnapshotsByWorkspaceID(ctx context.Context, workspaceID idwrap.IDWrap) ([]mhttp.HTTP, error)

func (*Reader) GetWorkspaceID

func (r *Reader) GetWorkspaceID(ctx context.Context, id idwrap.IDWrap) (idwrap.IDWrap, error)

type SearchParamReader

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

func NewSearchParamReader

func NewSearchParamReader(db *sql.DB) *SearchParamReader

func NewSearchParamReaderFromQueries

func NewSearchParamReaderFromQueries(queries *gen.Queries) *SearchParamReader

func (*SearchParamReader) GetByHttpID

func (r *SearchParamReader) GetByHttpID(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPSearchParam, error)

func (*SearchParamReader) GetByHttpIDOrdered

func (r *SearchParamReader) GetByHttpIDOrdered(ctx context.Context, httpID idwrap.IDWrap) ([]mhttp.HTTPSearchParam, error)

func (*SearchParamReader) GetByHttpIDs

func (r *SearchParamReader) GetByHttpIDs(ctx context.Context, httpIDs []idwrap.IDWrap) (map[idwrap.IDWrap][]mhttp.HTTPSearchParam, error)

func (*SearchParamReader) GetByID

func (*SearchParamReader) GetByIDs

func (*SearchParamReader) GetStreaming

func (r *SearchParamReader) GetStreaming(ctx context.Context, httpIDs []idwrap.IDWrap, updatedAt int64) ([]gen.GetHTTPSearchParamsStreamingRow, error)

type SearchParamWriter

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

func NewSearchParamWriter

func NewSearchParamWriter(tx gen.DBTX) *SearchParamWriter

func NewSearchParamWriterFromQueries

func NewSearchParamWriterFromQueries(queries *gen.Queries) *SearchParamWriter

func (*SearchParamWriter) Create

func (*SearchParamWriter) CreateBulk

func (w *SearchParamWriter) CreateBulk(ctx context.Context, httpID idwrap.IDWrap, params []mhttp.HTTPSearchParam) error

func (*SearchParamWriter) Delete

func (w *SearchParamWriter) Delete(ctx context.Context, paramID idwrap.IDWrap) error

func (*SearchParamWriter) DeleteByHttpID

func (w *SearchParamWriter) DeleteByHttpID(ctx context.Context, httpID idwrap.IDWrap) error

func (*SearchParamWriter) ResetDelta

func (w *SearchParamWriter) ResetDelta(ctx context.Context, id idwrap.IDWrap) error

func (*SearchParamWriter) Update

func (*SearchParamWriter) UpdateDelta

func (w *SearchParamWriter) UpdateDelta(ctx context.Context, id idwrap.IDWrap, deltaKey *string, deltaValue *string, deltaEnabled *bool, deltaDescription *string, deltaOrder *float64) error

func (*SearchParamWriter) UpdateOrder

func (w *SearchParamWriter) UpdateOrder(ctx context.Context, id idwrap.IDWrap, httpID idwrap.IDWrap, order float64) error

type Writer

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

func NewWriter

func NewWriter(tx gen.DBTX) *Writer

func NewWriterFromQueries

func NewWriterFromQueries(queries *gen.Queries) *Writer

func (*Writer) Create

func (w *Writer) Create(ctx context.Context, http *mhttp.HTTP) error

func (*Writer) CreateHttpVersion

func (w *Writer) CreateHttpVersion(ctx context.Context, httpID, createdBy idwrap.IDWrap, versionName, versionDescription string) (*mhttp.HttpVersion, error)

func (*Writer) Delete

func (w *Writer) Delete(ctx context.Context, id idwrap.IDWrap) error

func (*Writer) Update

func (w *Writer) Update(ctx context.Context, http *mhttp.HTTP) error

func (*Writer) Upsert

func (w *Writer) Upsert(ctx context.Context, http *mhttp.HTTP) error

Jump to

Keyboard shortcuts

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