Documentation ¶
Overview ¶
package armies contains the types, methods, and interfaces for interacting with Warhammer Age of Sigmar Armies
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = map[string]string{"message": "Resource could not be found"}
)
Functions ¶
Types ¶
type Armies ¶
type Armies []Army
Armies is a helper type to allow receiver methods for a slice of Army
Example ¶
Create a new handler and add a function to the route
package main import ( "github.com/brittonhayes/warhammer-aos/internal/handlers" "github.com/brittonhayes/warhammer-aos/pkg/armies" ) func main() { _ = handlers.New().AddRoute("*", armies.List()).Build() }
Output:
type MeleeWeapon ¶
type MeleeWeapon struct { Name string `json:"name"` Range string `json:"range"` Attacks string `json:"attacks"` ToHit string `json:"to_hit"` ToWound string `json:"to_wound"` Rend string `json:"rend"` Damage string `json:"damage"` }
MeleeWeapon is a weapon that is used for close quarters combat
type MissileWeapon ¶
type MissileWeapon struct { Name string `json:"name"` Range string `json:"range"` Attacks string `json:"attacks"` ToHit string `json:"to_hit"` ToWound string `json:"to_wound"` Rend string `json:"rend"` Damage string `json:"damage"` }
MissileWeapon is a weapon that is used for ranged attacks
type Service ¶
type Service interface {
// contains filtered or unexported methods
}
Service covers all available methods of the Armies package
type Unit ¶
type Unit struct { Name string `json:"name"` Size string `json:"size"` Move string `json:"move"` Save string `json:"save"` Bravery string `json:"bravery"` Wounds string `json:"wounds"` MissileWeapon []MissileWeapon `json:"missile_weapon,omitempty"` MeleeWeapon []MissileWeapon `json:"melee_weapon,omitempty"` Abilities []Ability `json:"abilities"` Keywords []string `json:"keywords"` }
Unit is an individual unit in Warhammer
Click to show internal directories.
Click to hide internal directories.