project

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx context.Context, input *CreateProjectReq) (err error)

Create is the business logic for creating a project

Types

type CreateProjectReq

type CreateProjectReq struct {
	Name         *string       `json:"name"`
	Description  *string       `json:"description,omitempty"`
	Color        *string       `json:"hex_color,omitempty"`
	Participants []Participant `json:"participants"`
	CreatedByID  *string       `json:"created_by_id,omitempty"`
	Slug         *string       `json:"slug,omitempty"`
}

CreateProjectReq models the data to create a project

func (*CreateProjectReq) Validate

func (cpr *CreateProjectReq) Validate() (err error)

Validate validation of data for registration

type Participant

type Participant struct {
	UserID        *string    `json:"user_id"`
	StartDate     *time.Time `json:"start_date"`
	DepartureDate *time.Time `json:"departure_date,omitempty"`
}

Participant models the data the a participant

Jump to

Keyboard shortcuts

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