utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionURLBuilder

func ConnectionURLBuilder(n string) (string, error)

ConnectionURLBuilder func for building URL connection.

func NewValidator

func NewValidator() *validator.Validate

NewValidator func for create a new validator for model fields.

func StartServer

func StartServer(a *fiber.App)

StartServer func for starting a simple server.

func StartServerWithGracefulShutdown

func StartServerWithGracefulShutdown(a *fiber.App)

StartServerWithGracefulShutdown function for starting server with a graceful shutdown.

func ValidatorErrors

func ValidatorErrors(err error) map[string]string

ValidatorErrors func for show validation errors for each invalid fields.

Types

type GeminiService

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

func NewGeminiService

func NewGeminiService() *GeminiService

func (*GeminiService) GenerateContent

func (s *GeminiService) GenerateContent(ctx context.Context, prompt string) (string, error)

GenerateContent func generate content from AI models

type GithubService

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

func NewGithubService

func NewGithubService() *GithubService

func (*GithubService) GetReadme

func (s *GithubService) GetReadme(ctx context.Context, username string) (string, error)

GetReadme func get README.md content by username

func (*GithubService) GetUserProfile

func (s *GithubService) GetUserProfile(ctx context.Context, username string) (*models.ProfileResponse, error)

GetUserProfile func get user profile by username

func (*GithubService) GetUserRepositories

func (s *GithubService) GetUserRepositories(ctx context.Context, username string) ([]*models.Repository, error)

GetUserRepositories func get user repositories by username

Jump to

Keyboard shortcuts

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