package
0.0.0-20230302232303-42c0c98a02f4
Repository: https://github.com/bradhacker/compsole.git
Documentation: pkg.go.dev
# Functions
CompetitionEntToModel converts the result of a Competition ENT query into a CompetitionModel for API responses.
CreateCompetition godoc
@Security ServiceAuth @Summary Create a Competition @Schemes http https @Description Create a Competition @Tags Service API @Param competition body rest.CompetitionInput true "The competition to create" @Produce json @Success 201 {object} rest.CompetitionModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/competition [post].
CreateProvider godoc
@Security ServiceAuth @Summary Create a Provider @Schemes http https @Description Create a Provider @Tags Service API @Param provider body rest.ProviderInput true "The provider to create" @Produce json @Success 201 {object} rest.ProviderModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/provider [post].
CreateTeam godoc
@Security ServiceAuth @Summary Create a Team @Schemes http https @Description Create a Team @Tags Service API @Param team body rest.TeamInput true "The team to create" @Produce json @Success 201 {object} rest.TeamModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/team [post].
CreateUser godoc
@Security ServiceAuth @Summary Create a User @Schemes http https @Description Create a User @Tags Service API @Param user body rest.UserInput true "The user to create" @Produce json @Success 201 {object} rest.UserModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/user [post].
CreateVMObject godoc
@Security ServiceAuth @Summary Create a VM Object @Schemes http https @Description Create a VM Object @Tags Service API @Param vm_object body rest.VmObjectInput true "The vm object to create" @Produce json @Success 201 {object} rest.VmObjectModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/vm-object [post].
DeleteCompetition godoc
@Security ServiceAuth @Summary Delete a Competition @Schemes http https @Description Delete a Competition @Tags Service API @Param id path string true "The id of the competition" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 204 @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/competition/{id} [delete].
DeleteProvider godoc
@Security ServiceAuth @Summary Delete a Provider @Schemes http https @Description Delete a Provider @Tags Service API @Param id path string true "The id of the provider" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 204 @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/provider/{id} [delete].
DeleteTeam godoc
@Security ServiceAuth @Summary Delete a Team @Schemes http https @Description Delete a Team @Tags Service API @Param id path string true "The id of the team" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 204 @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/team/{id} [delete].
DeleteUser godoc
@Security ServiceAuth @Summary Delete a User @Schemes http https @Description Delete a User @Tags Service API @Param id path string true "The id of the user" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 204 @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/user/{id} [delete].
DeleteVMObject godoc
@Security ServiceAuth @Summary Delete a VM Object @Schemes http https @Description Delete a VM Object @Tags Service API @Param id path string true "The id of the vm object" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 204 @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/vm-object/{id} [delete].
GetCompetition godoc
@Security ServiceAuth @Summary Get a Competition @Schemes http https @Description Get a Competition @Tags Service API @Param id path string true "The id of the competition" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 200 {object} rest.CompetitionModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/competition/{id} [get].
GetProvider godoc
@Security ServiceAuth @Summary Get a provider @Schemes http https @Description Get a provider @Tags Service API @Param id path string true "The id of the provider" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 200 {object} rest.ProviderModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/provider/{id} [get].
GetTeam godoc
@Security ServiceAuth @Summary Get a Team @Schemes http https @Description Get a Team @Tags Service API @Param id path string true "The id of the team" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 200 {object} rest.TeamModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/team/{id} [get].
GetUser godoc
@Security ServiceAuth @Summary Get a User @Schemes http https @Description Get a User @Tags Service API @Param id path string true "The id of the user" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 200 {object} rest.UserModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/user/{id} [get].
GetVMObject godoc
@Security ServiceAuth @Summary Get a VM Object @Schemes http https @Description Get a VM Object @Tags Service API @Param id path string true "The id of the vm object" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Produce json @Success 200 {object} rest.VmObjectModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/vm-object/{id} [get].
ListCompetitions godoc
@Security ServiceAuth @Summary List all Competitions @Schemes http https @Description List all Competitions @Tags Service API @Param field query string false "Field to search by (optional)" Enums(name) validate(optional) @Param q query string false "Search text (optional)" validate(optional) @Produce json @Success 200 {array} rest.CompetitionModel @Failure 500 {object} api.APIError @Router /rest/competition [get].
ListProviders godoc
@Security ServiceAuth @Summary List all Providers @Schemes http https @Description List all Providers @Tags Service API @Param field query string false "Field to search by (optional)" Enums(name) validate(optional) @Param q query string false "Search text (optional)" validate(optional) @Produce json @Success 200 {array} rest.ProviderModel @Failure 500 {object} api.APIError @Router /rest/provider [get].
ListTeams godoc
@Security ServiceAuth @Summary List all Teams @Schemes http https @Description List all Teams @Tags Service API @Param field query string false "Field to search by (optional)" Enums(name,number) validate(optional) @Param q query string false "Search text (optional)" validate(optional) @Produce json @Success 200 {array} rest.TeamModel @Failure 500 {object} api.APIError @Router /rest/team [get].
ListUsers godoc
@Security ServiceAuth @Summary List all Users @Schemes http https @Description List all Users @Tags Service API @Param field query string false "Field to search by (optional)" Enums(username,first_name,last_name) validate(optional) @Param q query string false "Search text (optional)" validate(optional) @Produce json @Success 200 {array} rest.UserModel @Failure 500 {object} api.APIError @Router /rest/user [get].
ListVmObjects godoc
@Security ServiceAuth @Summary List all VM Objects @Schemes http https @Description List all VM Objects @Tags Service API @Param field query string false "Field to search by (optional)" Enums(identifier,name) validate(optional) @Param q query string false "Search text (optional)" validate(optional) @Produce json @Success 200 {array} rest.VmObjectModel @Failure 500 {object} api.APIError @Router /rest/vm-object [get].
ProviderEntToModel converts the result of a Provider ENT query into a ProviderModel for API responses.
No description provided by the author
ServiceLogin godoc
@Summary Login with a service account and get a session token @Schemes http https @Description Login with a service account and get a session token.
ServiceTokenRefresh godoc
@Summary Refresh a service account session without re-authenticating @Schemes http https @Description Refresh a service account session without re-authenticating @Tags Auth API @Param Cookie header string false "refresh-token" default(refresh-token=xxx) @Produce json @Success 200 {object} ServiceLoginResult @Failure 401 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/token/refresh [post]
ServiceTokenRefresh handles refreshing sessions automatically.
TeamEntToModel converts the result of a Team ENT query into a TeamModel for API responses.
UpdateCompetition godoc
@Security ServiceAuth @Summary Update a Competition @Schemes http https @Description Update a Competition @Tags Service API @Param id path string true "The id of the competition" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param competition body rest.CompetitionInput true "The updated competition" @Produce json @Success 201 {object} rest.CompetitionModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/competition/{id} [put].
UpdateProvider godoc
@Security ServiceAuth @Summary Update a Provider @Schemes http https @Description Update a Provider @Tags Service API @Param id path string true "The id of the provider" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param provider body rest.ProviderInput true "The updated provider" @Produce json @Success 201 {object} rest.ProviderModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/provider/{id} [put].
UpdateTeam godoc
@Security ServiceAuth @Summary Update a Team @Schemes http https @Description Update a Team @Tags Service API @Param id path string true "The id of the team" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param team body rest.TeamInput true "The updated team" @Produce json @Success 201 {object} rest.TeamModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/team/{id} [put].
UpdateUser godoc
@Security ServiceAuth @Summary Update a User @Schemes http https @Description Update a User @Tags Service API @Param id path string true "The id of the user" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param user body rest.UserInput true "The updated user" @Produce json @Success 201 {object} rest.UserModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/user/{id} [put].
UpdateVMObject godoc
@Security ServiceAuth @Summary Update a VM Object @Schemes http https @Description Update a VM Object @Tags Service API @Param id path string true "The id of the vm object" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param vm_object body rest.VmObjectInput true "The updated vm object" @Produce json @Success 201 {object} rest.VmObjectModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/vm-object/{id} [put].
UpdateVMObjectIdentifier godoc
@Security ServiceAuth @Summary Update the Identifier of a VM Object @Schemes http https @Description Update the Identifier of a VM Object @Tags Service API @Param id path string true "The id of the vm object" format(uuid) example(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) @Param identifier body rest.VmObjectIdentifierInput true "The updated vm object identifier" @Produce json @Success 201 {object} rest.VmObjectModel @Failure 422 {object} api.APIError @Failure 404 {object} api.APIError @Failure 500 {object} api.APIError @Router /rest/vm-object/{id}/identifier [put].
UserEntToModel converts the result of a User ENT query into a UserModel for API responses.
VmObjectEntToModel converts the result of a VM Object ENT query into a VmObjectModel for API responses.
# Constants
No description provided by the author
No description provided by the author
# Structs
CompetitionEdge model info
@Description Used for Competition in edges.
CompetitionInput model info
@Description Used as an input model for creating/updating Competitions.
CompetitionModel model info
@Description Used for Competition endpoints.
ProviderEdge model info
@Description Used for Provider in edges.
ProviderInput model info
@Description Used as an input model for creating/updating Providers.
ProviderModel model info
@Description Used for Provider endpoints.
No description provided by the author
No description provided by the author
TeamEdge model info
@Description Used for Team in edges.
TeamInput model info
@Description Used as an input model for creating/updating Teams.
TeamModel model info
@Description Used for Team endpoints.
UserEdge model info
@Description Used for User in edges.
UserInput model info
@Description Used as an input model for creating/updating Users.
UserModel model info
@Description Used for User endpoints.
VmObjectModel model info
@Description Used for VM Object in edges.
VmObjectInput model info
@Description Used as an input model for updating VM Object identifiers.
VmObjectInput model info
@Description Used as an input model for creating/updating VM Objects.
VmObjectModel model info
@Description Used for VM Object endpoints.