domain

package
v0.0.0-...-0da9dd1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID        int        `db:"event_id" json:"id,omitempty"`
	Name      *string    `db:"name" json:"name"`
	ProjectID int        `db:"project_id" json:"project_id"`
	Timestamp *time.Time `db:"timestamp" json:"timestamp"`
}

type EventsRepository

type EventsRepository interface {
	SearchEvents(p SearchEventsInput) (*[]Event, error)
	CreateEvent(event Event) (int, error)
	ReadEvent(id int) (*Event, error)
}

type EventsService

type EventsService interface {
	SearchEvents(p SearchEventsInput) (*[]Event, error)
	LogEvent(p LogEventInput) (int, error)
	ReadEvent(id int) (*Event, error)
}

type LogEventInput

type LogEventInput struct {
	RepoURL       string
	CommitMessage string
}

type Project

type Project struct {
	ID          int              `db:"project_id" json:"id"`
	Name        *string          `db:"name" json:"name"`
	Vertical    *string          `db:"vertical" json:"vertical"`
	Event       *string          `db:"event" json:"event"`
	URL         *string          `db:"url" json:"url"`
	Credentials *json.RawMessage `db:"credentials" json:"credentials,omitempty"`
	CreatedAt   *time.Time       `db:"created_at" json:"created_at"`
	UpdatedAt   *time.Time       `db:"updated_at" json:"updated_at"`
}

type ProjectsRepository

type ProjectsRepository interface {
	SearchProjects(p SearchProjectsInput) (*[]Project, error)
	CreateProject(project Project) (int, error)
	ReadProject(id int) (*Project, error)
	UpdateProject(id int, project Project) (int64, error)
	DeleteProject(id int) (int64, error) // TODO: project archive (soft delete)
}

type ProjectsService

type ProjectsService interface {
	SearchProjects(p SearchProjectsInput) (*[]Project, error)
	CreateProject(project Project) (int, error)
	ReadProject(id int) (*Project, error)
	UpdateProject(id int, project Project) (int64, error)
	DeleteProject(id int) (int64, error)
}

type SearchEventsInput

type SearchEventsInput struct {
	Name string
}

type SearchProjectsInput

type SearchProjectsInput struct {
	Name string
	URL  string
}

Directories

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

Jump to

Keyboard shortcuts

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