models

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentRequest

type ContentRequest struct {
	Username string   `json:"username" validate:"required,min=6,max=32"`
	Lang     Language `json:"lang" validate:"required,oneof=auto id en"`
}

type ContentResponse

type ContentResponse struct {
	GeneratedContent string `json:"generated_content"`
}

type ContentResponseFailure

type ContentResponseFailure struct {
	Error string `json:"error"`
}

type ContentResponseSuccess

type ContentResponseSuccess struct {
	Data ContentResponse `json:"data"`
}

type GithubData

type GithubData struct {
	ProfileResponse *ProfileResponse `json:"profile,omitempty"`
	Repositories    *[]Repository    `json:"repositories,omitempty"`
}

type Language

type Language string
const (
	LangAuto Language = "auto"
	LangID   Language = "id"
	LangEN   Language = "en"
)

type ProfileResponse

type ProfileResponse struct {
	Name      *string           `json:"name,omitempty"`
	Bio       *string           `json:"bio,omitempty"`
	Company   *string           `json:"company,omitempty"`
	Location  *string           `json:"location,omitempty"`
	Followers *int              `json:"followers,omitempty"`
	Following *int              `json:"following,omitempty"`
	Repos     *int              `json:"repos,omitempty"`
	CreatedAt *github.Timestamp `json:"created_at,omitempty"`
	UpdatedAt *github.Timestamp `json:"updated_at,omitempty"`
}

type Repository

type Repository struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Lang        string `json:"lang,omitempty"`
	Stars       int    `json:"stars"`
	Forks       int    `json:"forks"`
	Watchers    int    `json:"watchers"`
	OpenIssues  int    `json:"open_issues"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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