organization

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(
	organizationManager *organizationmanager.OrganizationManager,
) (*Handler, error)

func (*Handler) CreateOrganization

func (h *Handler) CreateOrganization() http.HandlerFunc

@Id createOrganization @Summary Create organization @Description Create a new organization @Tags organization @Accept json @Produce json @Param organization body request.CreateOrganizationRequest true "Created organization" @Success 200 {object} handler.Response{data=entity.Organization} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/orgs [post]

func (*Handler) DeleteOrganization

func (h *Handler) DeleteOrganization() http.HandlerFunc

@Id deleteOrganization @Summary Delete organization @Description Delete specified organization by ID @Tags organization @Produce json @Param orgID path int true "Organization ID" @Success 200 {object} handler.Response{data=string} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/orgs/{orgID} [delete]

func (*Handler) GetOrganization

func (h *Handler) GetOrganization() http.HandlerFunc

@Id getOrganization @Summary Get organization @Description Get organization information by organization ID @Tags organization @Produce json @Param orgID path int true "Organization ID" @Success 200 {object} handler.Response{data=entity.Organization} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/orgs/{orgID} [get]

func (*Handler) ListOrganizations

func (h *Handler) ListOrganizations() http.HandlerFunc

@Id listOrganization @Summary List organizations @Description List all organizations @Tags organization @Produce json @Param page query uint false "The current page to fetch. Default to 1" @Param pageSize query uint false "The size of the page. Default to 10" @Param sortBy query string false "Which field to sort the list by. Default to id" @Param ascending query bool false "Whether to sort the list in ascending order. Default to false" @Success 200 {object} handler.Response{data=response.PaginatedOrganizationResponse} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/orgs [get]

func (*Handler) UpdateOrganization

func (h *Handler) UpdateOrganization() http.HandlerFunc

@Id updateOrganization @Summary Update organization @Description Update the specified organization @Tags organization @Accept json @Produce json @Param orgID path int true "Organization ID" @Param organization body request.UpdateOrganizationRequest true "Updated organization" @Success 200 {object} handler.Response{data=entity.Organization} "Success" @Failure 400 {object} error "Bad Request" @Failure 401 {object} error "Unauthorized" @Failure 429 {object} error "Too Many Requests" @Failure 404 {object} error "Not Found" @Failure 500 {object} error "Internal Server Error" @Router /api/v1/orgs/{orgID} [put]

type OrganizationRequestParams

type OrganizationRequestParams struct {
	OrganizationID uint
}

Jump to

Keyboard shortcuts

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