godex

package module
v0.0.0-...-3f4e590 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

README

godex

Experimental golang cli with DDD-ish design for pokedex item and pokemon information search

godex

Go Report Card Build Status

Experimental golang cli with DDD-ish design for pokedex item and pokemon information search

Entities: Item Pokemon Ability

Installation | Installation (with docker) | Usage | License

godex is pokedex information search using https://pokeapi.co/api/v2 as backend.

Installation

  • go get github.com/AdhityaRamadhanus/godex
  • cd to project dir
  • run build
make build
  • run ./godex

Installation With Docker

  • go get github.com/AdhityaRamadhanus/godex
  • cd to project dir
  • run build image
docker build -t godex .
  • run ./godex
docker run -it godex [pokemon/item name]

Usage

./gode [pokemon/item name]

License

MIT © [Adhitya Ramadhanus]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(text string, separator string) string

Capitalize return string capitalized with specific separator

func Slugify

func Slugify(text string) string

Slugify return a human readable slug of a text

Types

type Abilities

type Abilities []Ability

type Ability

type Ability struct {
	ID      int
	Name    string
	Effects []string
}

Ability domain entity representing https://pokeapi.co/docs/v2.html/#abilities

func (Ability) String

func (a Ability) String() string

type Item

type Item struct {
	Effects []string
	Name    string
	Cost    uint
}

Item domain entity representing https://pokeapi.co/docs/v2.html/#items-section

func (Item) String

func (i Item) String() string

type Pokemon

type Pokemon struct {
	Abilities Abilities
	Name      string
	ID        int
	Types     []string
}

Pokemon domain entity representing https://pokeapi.co/docs/v2.html/#pokemon-section

func (Pokemon) String

func (p Pokemon) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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