core

package module
v0.0.0-...-8cb0273 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: MIT Imports: 3 Imported by: 36

README

Sample Core

Build Status codecov Go Report Card GoDoc License

Installation

Get the core repository

go get github.com/goboilerplates/core

cd echo $GOPATH/src/github.com/goboilerplates/core

And install dependencies

go get -u github.com/golang/dep/cmd/dep

dep ensure

Running the tests

Run all tests

go test ./...

Or run all tests with coverage

bash script/coverage.sh

Build and Run

Run main.go

go run test/main.go

Build and run native binary

bash script/Build.sh

./core.out

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE file for details

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetSamplesInteractor

type GetSamplesInteractor interface {
	All() ([]*SampleEntity, error)
	AllByName(keyword string) ([]*SampleEntity, error)
}

GetSamplesInteractor is the interface of GetSamplesInteractor.

func CreateDefaultGetSamples

func CreateDefaultGetSamples(names ...string) GetSamplesInteractor

CreateDefaultGetSamples .

type GetSamplesInteractorImpl

type GetSamplesInteractorImpl struct {
	Samples []*SampleEntity
}

GetSamplesInteractorImpl is the implementation of GetSamplesInteractor interface.

func (GetSamplesInteractorImpl) All

func (interactor GetSamplesInteractorImpl) All() ([]*SampleEntity, error)

All gets all samples.

func (GetSamplesInteractorImpl) AllByName

func (interactor GetSamplesInteractorImpl) AllByName(keyword string) ([]*SampleEntity, error)

AllByName gets all samples that have name matched with keyword.

type SampleEntity

type SampleEntity struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

SampleEntity is the sample entity struct.

func (SampleEntity) NameLower

func (sampleEntity SampleEntity) NameLower() string

NameLower gets lowercase name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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