gateway

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NormalMessagePrompt = "Generate up to 5 commit messages for [%s]. Each message should be separated by only space"
)

Variables

View Source
var CommitMessageRegex = regexp.MustCompile(`^(\d.\s+)|^(-\s+)|^(\s+)`)

Functions

func NewClientCommitMessageGateway added in v0.5.0

func NewClientCommitMessageGateway(nlp service.NLPService) service.CommitMessageService

func NewGeminiServerGateway added in v0.5.2

func NewGeminiServerGateway() service.CommitMessageService

func NewGithubGateway added in v0.5.2

func NewGithubGateway() service.GithubService

func NewGrpcServerGateway added in v0.5.0

func NewGrpcServerGateway() service.CommitMessageService

func NewOpenAIGateway

func NewOpenAIGateway(ctx context.Context) service.NLPService

func NewQdrantServerGateway added in v0.5.2

func NewQdrantServerGateway() service.CommitMessageService

Types

type HttpClient added in v0.5.2

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

func NewHttpClient added in v0.5.2

func NewHttpClient() *HttpClient

func (*HttpClient) Execute added in v0.5.2

func (h *HttpClient) Execute(method HttpMethod) ([]byte, error)

func (*HttpClient) WithBaseURL added in v0.5.2

func (h *HttpClient) WithBaseURL(baseURL string) *HttpClient

func (*HttpClient) WithBearerToken added in v0.5.2

func (h *HttpClient) WithBearerToken(token string) *HttpClient

func (*HttpClient) WithBody added in v0.5.2

func (h *HttpClient) WithBody(values []byte) *HttpClient

func (*HttpClient) WithHeader added in v0.5.2

func (h *HttpClient) WithHeader(key, value string) *HttpClient

func (*HttpClient) WithParam added in v0.5.2

func (h *HttpClient) WithParam(key string, value interface{}) *HttpClient

func (*HttpClient) WithPath added in v0.5.2

func (h *HttpClient) WithPath(path string) *HttpClient

type HttpMethod added in v0.5.2

type HttpMethod int
const (
	GET HttpMethod = iota + 1
	POST
	DELTE
	PUT
)

Jump to

Keyboard shortcuts

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