organization

package
v0.11.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 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

@Summary Create organization @Description Create a new organization @Accept json @Produce json @Param organization body CreateOrganizationRequest true "Created organization" @Success 200 {object} entity.Organization "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/organization/{organizationName} [post]

func (*Handler) DeleteOrganization

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

@Summary Delete organization @Description Delete specified organization by ID @Produce json @Param id path int true "Organization ID" @Success 200 {object} entity.Organization "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/organization/{organizationID} [delete]

func (*Handler) GetOrganization

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

@Summary Get organization @Description Get organization information by organization ID @Produce json @Param id path int true "Organization ID" @Success 200 {object} entity.Organization "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/organization/{organizationID} [get]

func (*Handler) ListOrganizations

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

@Summary List organizations @Description List all organizations @Produce json @Success 200 {object} entity.Organization "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/organization [get]

func (*Handler) UpdateOrganization

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

@Summary Update organization @Description Update the specified organization @Accept json @Produce json @Param organization body UpdateOrganizationRequest true "Updated organization" @Success 200 {object} entity.Organization "Success" @Failure 400 {object} errors.DetailError "Bad Request" @Failure 401 {object} errors.DetailError "Unauthorized" @Failure 429 {object} errors.DetailError "Too Many Requests" @Failure 404 {object} errors.DetailError "Not Found" @Failure 500 {object} errors.DetailError "Internal Server Error" @Router /api/v1/organization/{organizationID} [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