examples

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServer

func StartServer(configFile string, port string)

StartServer starts interests web service

Types

type GetByIDResponse

type GetByIDResponse struct {
	Response
	Result *Interest
}

GetByIDResponse represents get by id response.

type GetByIDsResponse

type GetByIDsResponse struct {
	Response
	Result []*Interest
}

GetByIDsResponse represents a get by ids response.

type Interest

type Interest struct {
	ID        int `autoincrement:"true"`
	Name      string
	Category  string
	Status    *bool  `valueMap:"yes:true,no:false"`
	GroupName string `transient:"true"`
}

Interest represents an generic interest.

type InterestService

type InterestService interface {

	//GetById returns interest by id
	GetByID(id int) *GetByIDResponse

	//GetByIds returns interests by passed in ids
	GetByIDs(id ...int) *GetByIDsResponse

	//PersistTable persists passed in interests
	Persist(interests []*Interest) *PersistResponse

	//DeleteById deletes interestes by id.
	DeleteByID(id int) *Response
}

InterestService a test service

func NewInterestService

func NewInterestService(configURL string) (InterestService, error)

NewInterestService creates a new interests service

func NewInterestServiceClient

func NewInterestServiceClient(server string) InterestService

NewInterestServiceClient creates a new InterestService client

type PersistResponse

type PersistResponse struct {
	Response
	Result []*Interest
}

PersistResponse represents a persist response.

type Response

type Response struct {
	Status  string
	Message string
}

Response represents a response.

Jump to

Keyboard shortcuts

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