model

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTags

func ExtractTags(choice string) ([]string, error)

Types

type Request

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

func NewRequest

func NewRequest(project string, domain, language, choice string) *Request

func (*Request) GetChoice

func (r *Request) GetChoice() string

func (*Request) GetDomain

func (r *Request) GetDomain() string

func (*Request) GetLanguage

func (r *Request) GetLanguage() string

func (*Request) GetProject

func (r *Request) GetProject() string

func (*Request) String

func (r *Request) String() string

func (*Request) ToQuery added in v0.2.0

func (r *Request) ToQuery() (string, error)

func (*Request) UniqueKey

func (r *Request) UniqueKey(hasher *maphash.Hash) uint64

type Response

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

func NewResponse

func NewResponse(
	headers http.Header,
	statusCode int,
	req *Request,
	body []byte,
	creator ResponseCreator,
	revalidateInterval time.Duration,
	revalidateBeta float64,
) (*Response, error)

func (*Response) GetBody

func (r *Response) GetBody() []byte

func (*Response) GetHeaders

func (r *Response) GetHeaders() http.Header

func (*Response) GetListElement

func (r *Response) GetListElement() *list.Element

func (*Response) GetRequest

func (r *Response) GetRequest() *Request

func (*Response) Revalidate

func (r *Response) Revalidate(ctx context.Context)

func (*Response) SetListElement

func (r *Response) SetListElement(el *list.Element)

func (*Response) ShouldBeRevalidated

func (r *Response) ShouldBeRevalidated() bool

func (*Response) Size

func (r *Response) Size() uintptr

func (*Response) StatusCode added in v0.2.6

func (r *Response) StatusCode() int

type ResponseCreator added in v0.2.0

type ResponseCreator func(ctx context.Context, req *Request) (statusCode int, body []byte, headers http.Header, err error)

Jump to

Keyboard shortcuts

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