responses

package
v0.0.0-...-14027d0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrganizationInfoResponse

type OrganizationInfoResponse struct {
	Organization OrganizationResponse `json:"organization"`
}

type OrganizationListResponse

type OrganizationListResponse struct {
	Organizations []OrganizationResponse `json:"organizations"`
}

type OrganizationResponse

type OrganizationResponse struct {
	OrganizationId   string       `json:"organization_id" validate:"required"`
	OrganizationName string       `json:"organization_name" validate:"required"`
	Type             string       `json:"organization_type" validate:"required"`
	State            models.State `json:"organization_state" validate:"required"`
	AddressLine1     string       `json:"address_line_1"`
	AddressLine2     string       `json:"address_line_2"`
	City             string       `json:"city"`
	Country          string       `json:"country"`
	Zip              string       `json:"zip"`
	ContactPerson    string       `json:"contact_person"`
	ContactDetails   string       `json:"contact_details"`
	Website          string       `json:"website"`
	OnboardedAt      time.Time    `json:"onboarded_at" validate:"required"`
	ActivatedAt      time.Time    `json:"activated_at"`
	ActiveUserCount  int          `json:"active_user_count"`
	UserCount        int          `json:"user_count"`
	Comments         string       `json:"comments"`
}

func ListOrganizationsResponseBody

func ListOrganizationsResponseBody(ctx context.Context, organizationsData []models.Organization) ([]OrganizationResponse, error)

func OrganizationInfoResponseBody

func OrganizationInfoResponseBody(ctx context.Context, organizationData models.Organization) (OrganizationResponse, error)

type ResponseData

type ResponseData struct {
	Message string
	State   int
}

func ActivateOrganizationResponse

func ActivateOrganizationResponse(ctx context.Context) (ResponseData, error)

func ActivateUserResponse

func ActivateUserResponse(ctx context.Context) (ResponseData, error)

func CreateOrganizationResponse

func CreateOrganizationResponse(ctx context.Context) (ResponseData, error)

func CreateUserResponse

func CreateUserResponse(ctx context.Context) (ResponseData, error)

func DeleteOrganizationResponse

func DeleteOrganizationResponse(ctx context.Context) (ResponseData, error)

func DeleteUserResponse

func DeleteUserResponse(ctx context.Context) (ResponseData, error)

func UpdateOrganizationResponse

func UpdateOrganizationResponse(ctx context.Context) (ResponseData, error)

func UpdateUserResponse

func UpdateUserResponse(ctx context.Context) (ResponseData, error)

type ResponseMeta

type ResponseMeta struct {
	Page     int `json:"page"`
	NextPage int `json:"next_page"`
	Count    int `json:"count"`
}

type ResponseOrganizationActivate

type ResponseOrganizationActivate struct {
	State models.State `json:"state" validate:"required"`
}

type ResponseOrganizationCreate

type ResponseOrganizationCreate struct {
	OrganizationId string `json:"organization_id" validate:"required,uuid"`
}

type UserResponse

type UserResponse struct {
	OrganizationID string          `json:"organization_id" validate:"required"`
	UserID         string          `json:"user_id" validate:"required"`
	OtherNames     string          `json:"other_names"`
	FirstName      string          `json:"first_name"`
	LastName       string          `json:"last_name"`
	NameInitials   string          `json:"name_initials"`
	Email          string          `json:"email" validate:"required"`
	State          models.State    `json:"user_state"`
	Roles          json.RawMessage `json:"roles"`
	OnboardedAt    time.Time       `json:"onboarded_at" validate:"required"`
	ActivatedAt    time.Time       `json:"activated_at"`
	ContactNumber  string          `json:"contact_number"`
}

func ListUsersResponseBody

func ListUsersResponseBody(ctx context.Context, usersData []models.User) ([]UserResponse, error)

func UserInfoResponseBody

func UserInfoResponseBody(ctx context.Context, userData models.User) (UserResponse, error)

Jump to

Keyboard shortcuts

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