domains

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

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventRequest

type EventRequest interface {
	EventId() string
	EventType() string
	Operation() string
}

type Span

type Span struct {
	Name         string                 `validate:"required"`
	Cid          string                 `validate:"required"`
	Resource     string                 `validate:"required"`
	Version      string                 `validate:"required"`
	OrgId        string                 `validate:"required"`
	Line         int                    `validate:"required"`
	FuncName     string                 `validate:"required"`
	FileName     string                 `validate:"required"`
	Custom       map[string]interface{} `validate:"required"`
	InternalSpan zipkin.Span
}

func (*Span) Error

func (s *Span) Error(err error) *Span

func (*Span) Finish

func (s *Span) Finish()

func (*Span) Tag

func (s *Span) Tag(k string, v interface{}) *Span

type SpanConfig

type SpanConfig interface {
	Apply(ctx context.Context, s *Span)
}

func WithCustom

func WithCustom(k string, v interface{}) SpanConfig

func WithName

func WithName(v string) SpanConfig

func WithOrgId

func WithOrgId(v string) SpanConfig

type TypeEvent

type TypeEvent string
var (
	UsersTypeEvent TypeEvent = "users"
)

type User

type User struct {
	Id        *string    `projection:"id"`
	FirstName *string    `projection:"first_name" `
	LastName  *string    `projection:"last_name" `
	BirthDate *time.Time `projection:"birth_date" `
	CreatedAt time.Time  `projection:"created_at"`
	UpdatedAt time.Time  `projection:"updated_at"`
	DeletedAt *time.Time `projection:"deleted_at"`
}

type UserCreate

type UserCreate struct {
	FirstName string    `validate:"required"`
	LastName  string    `validate:"required"`
	BirthDate time.Time `validate:"required"`
}

type UserCreateRequestV1

type UserCreateRequestV1 struct {
	FirstName string         `json:"first_name" validate:"required"`
	LastName  string         `json:"last_name" validate:"required"`
	BirthDate times.JsonTime `json:"birth_date" validate:"required"`
}

func (*UserCreateRequestV1) UserCreate

func (c *UserCreateRequestV1) UserCreate() UserCreate

type UserCreateResponseV1

type UserCreateResponseV1 struct {
	Id        string         `json:"id" validate:"required"`
	FirstName string         `json:"first_name" validate:"required"`
	LastName  string         `json:"last_name" validate:"required"`
	BirthDate times.JsonTime `json:"birth_date" validate:"required"`
}

type UserEventRequest

type UserEventRequest struct {
	UserId    string         `json:"user_id" validate:"required"`
	FirstName string         `json:"first_name" validate:"required"`
	LastName  string         `json:"last_name" validate:"required"`
	BirthDate times.JsonTime `json:"birth_date" validate:"required"`
	// contains filtered or unexported fields
}

func NewUserCreatedEventRequest

func NewUserCreatedEventRequest(ctx context.Context, userId, firstName, lastName string, birthDate time.Time) UserEventRequest

func NewUserDeletedEventRequest

func NewUserDeletedEventRequest(ctx context.Context, userId, firstName, lastName string, birthDate time.Time) UserEventRequest

func NewUserUpdatedEventRequest

func NewUserUpdatedEventRequest(ctx context.Context, userId, firstName, lastName string, birthDate time.Time) UserEventRequest

func (UserEventRequest) EventId

func (p UserEventRequest) EventId() string

func (UserEventRequest) EventType

func (p UserEventRequest) EventType() string

func (UserEventRequest) Operation

func (p UserEventRequest) Operation() string

type UserFilter

type UserFilter struct {
	Id        *string    `filter:"id"`
	FirstName *string    `filter:"first_name"`
	LastName  *string    `filter:"last_name"`
	BirthDate *time.Time `filter:"birth_Date"`
	DeletedAt *time.Time `filter:"deleted_at"`
}

type UserGetResponseV1

type UserGetResponseV1 struct {
	Id        string         `json:"id"`
	FirstName string         `json:"first_name" validate:"required"`
	LastName  string         `json:"last_name" validate:"required"`
	BirthDate times.JsonTime `json:"birth_date" validate:"required"`
}

type UserListResponseV1

type UserListResponseV1 struct {
	Users []UserGetResponseV1 `json:"users"`
}

type UserProjection

type UserProjection struct {
	Id        bool `projection:"id"`
	FirstName bool `projection:"first_name"`
	LastName  bool `projection:"last_name"`
	BirthDate bool `projection:"birth_date"`
	CreatedAt bool `projection:"created_at"`
	UpdatedAt bool `projection:"updated_at"`
	DeletedAt bool `projection:"deleted_at"`
}

type UserSearch

type UserSearch struct {
	Filter     UserFilter
	Projection UserProjection
}

type UserUpdate

type UserUpdate struct {
	Id        string     `validate:"required"`
	FirstName *string    `validate:"omitempty,min=1"`
	LastName  *string    `validate:"omitempty,min=1"`
	BirthDate *time.Time `validate:"omitempty,required"`
}

type UserUpdateRequestV1

type UserUpdateRequestV1 struct {
	FirstName *string         `json:"first_name" validate:"omitempty,min=1"`
	LastName  *string         `json:"last_name" validate:"omitempty,min=1"`
	BirthDate *times.JsonTime `json:"birth_date" validate:"omitempty,min=1"`
}

func (*UserUpdateRequestV1) UserUpdate

func (c *UserUpdateRequestV1) UserUpdate(userId string) UserUpdate

type UserUpdateResponseV1

type UserUpdateResponseV1 struct {
	Id        string         `json:"id" validate:"required"`
	FirstName string         `json:"first_name" validate:"required"`
	LastName  string         `json:"last_name" validate:"required"`
	BirthDate times.JsonTime `json:"birth_date" validate:"required"`
}

Jump to

Keyboard shortcuts

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