core

package
v0.0.0-...-45db021 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

Core Package

Business logic for the cat-facts-operator. The controller will call functions in this package to perform tasks.

Testing

To test only the core package, cd into core and run:

go test -v

Otherwise run make test from the repo root to run tests from all packages.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetFactFromURL = getFactFromURL // Set function as variable for easier testing

Functions

func GenerateFact

func GenerateFact(instance *tacomoev1alpha1.CatFact) error

func GenerateIconName

func GenerateIconName(instance *tacomoev1alpha1.CatFact) error

Return a random IconName

func ProcessCatFact

func ProcessCatFact(instance *tacomoev1alpha1.CatFact) error

Types

type CatFactNinjaAPIResponse

type CatFactNinjaAPIResponse struct {
	Fact   string `json:"fact"`
	Length int    `json:"length"`
}

Jump to

Keyboard shortcuts

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