test

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAttributeTestData

func SetAttributeTestData() (rAttribute model.Attribute)

func SetEntityTestData

func SetEntityTestData() (r model.Entity)

SetEntityTestDataWithUsername

Types

type Attribute

type Attribute struct {
	ID int `json:"id,omitempty"`

	Body     string `json:"body" fake:"{sentence:10}`
	EntityID string `json:"entity_id,omitempty"`

	UpdatedAt time.Time `json:"updated_time,omitempty"`
	CreatedAt time.Time `json:"created_time,omitempty"`
}

type AttributeCreate

type AttributeCreate struct {
	Body string `json:"body" fake:"{sentence:10}`
}

type AttributeInvalid

type AttributeInvalid struct {
	Text string `json:"text"`
}

type AttributeUpdate

type AttributeUpdate struct {
	Body string `json:"body" fake:"{sentence:13}`
}

type Entity

type Entity struct {
	ID int `json:"id,omitempty"`

	Body       string      `json:"body" fake:"{sentence:3}"`
	Attributes []Attribute `json:"attributes,omitempty fake:"skip"`

	CreatedAt time.Time `json:"created_time,omitempty"`
	UpdatedAt time.Time `json:"updated_time,omitempty"`
}

type EntityCreate

type EntityCreate struct {
	Body string `json:"body" fake:"{sentence:3}"`
}

type EntityInvalid

type EntityInvalid struct {
	ID string `json:"id"`
}

type EntityUpdate

type EntityUpdate struct {
	ID   int
	Body string `json:"body" fake:"{sentence:2}"`
}

Directories

Path Synopsis
Package mock_usecase is a generated GoMock package.
Package mock_usecase is a generated GoMock package.

Jump to

Keyboard shortcuts

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