Categorygithub.com/prodyna/yasm-api-go
repositorypackage
0.9.10
Repository: https://github.com/prodyna/yasm-api-go.git
Documentation: pkg.go.dev

# README

Go API client for client

This is an example of using OAuth2 Implicit Flow in a specification to describe security to your API.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 0.9.10
  • Package version: 0.0.1
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import sw "./client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to /api/v1

ClassMethodHTTP requestDescription
AvailabilityApiCreateAvailabilityPost /persons/{personId}/availabilitiesCreate a availability for a person
AvailabilityApiDeleteAvailabilityDelete /persons/{personId}/availabilities/{availabilityId}Delete a person availability
AvailabilityApiGetAvailabilitiesGet /persons/{personId}/availabilitiesGet a list of all activities for a person
AvailabilityApiUpdateAvailabilityPut /persons/{personId}/availabilities/{availabilityId}Update a person availability
CertificationApiAddPersonCertificationPost /persons/{personId}/certifications/{certificationId}Add Certification to a Person
CertificationApiAddSkillToCertificationPost /certifications/{certificationId}/skills/{skillId}
CertificationApiCreateCertificationPost /organizations/{organizationId}/certificationsCreate a Certification in an Organization
CertificationApiDeleteCertificationDelete /certifications/{certificationId}Delete a Certification
CertificationApiDeletePersonCertificationDelete /persons/{personId}/certifications/{certificationId}Remove an Interest to a Person
CertificationApiDeleteSkillFromCertificationDelete /certifications/{certificationId}/skills/{skillId}
CertificationApiGetCertificationGet /certifications/{certificationId}Get details about a Certification
CertificationApiGetCertificationsGet /certificationsGet a list of all Certifations indepdenant of the Organization
CertificationApiGetCertificationsForOrganizationGet /organizations/{organizationId}/certificationsGet a list of all certifications for a organization
CertificationApiUpdateCertificationPut /certifications/{certificationId}Update a Certification
CertificationApiUpdatePersonCertificationPut /persons/{personId}/certifications/{certificationId}Update a Certification of a Person
CertificationApiUpdateSkillInCertificationPut /certifications/{certificationId}/skills/{skillId}
CountryApiAddLanguageToCountryPost /countries/{countryId}/languages/{languageId}Assign a language to a country
CountryApiCreateCountryPost /countriesCreate a new Country
CountryApiDeleteCountryDelete /countries/{countryId}Delete a Country
CountryApiGetCountriesGet /countriesGet all Countries
CountryApiGetCountryGet /countries/{countryId}Get details about a Country
CountryApiRemoveLanguageFromCountryDelete /countries/{countryId}/languages/{languageId}Assign a language to a country
CountryApiUpdateCountryPut /countries/{countryId}Update a Country
IndustryApiAttachOrganizationToIndustryPost /organizations/{organizationId}/industries/{industryId}Add an Organization to an Industry
IndustryApiCreateIndustryPost /industriesCreate an Industry
IndustryApiDeleteIndustryDelete /industries/{industryId}Delete an Industry
IndustryApiDetachOrganizationFromIndustryDelete /organizations/{organizationId}/industries/{industryId}Remove an Organization to an Industry
IndustryApiGetIndustriesGet /industriesGet all Industries
IndustryApiGetIndustryGet /industries/{industryId}Get details about an Industry
IndustryApiUpdateIndustryPut /industries/{industryId}Update an Industry
LanguageApiAddLanguageToCountryPost /countries/{countryId}/languages/{languageId}Assign a language to a country
LanguageApiCreateLanguagePost /languagesCreate a new language
LanguageApiDeleteLanguageDelete /languages/{languageId}Delete a language
LanguageApiGetLanguageGet /languages/{languageId}Get details about a language
LanguageApiGetLanguagesGet /languagesGet a list of Languages
LanguageApiRemoveLanguageFromCountryDelete /countries/{countryId}/languages/{languageId}Assign a language to a country
OfficeApiAddPersonOfficePost /persons/{personId}/offices/{officeId}Assing a person to an office
OfficeApiCreateOfficePost /organizations/{organizationId}/officesCreate an Office in an Organization
OfficeApiDeleteOfficeDelete /organizations/{organizationId}/offices/{officeId}Delte an Office from an Organization
OfficeApiDeletePersonOfficeDelete /persons/{personId}/offices/{officeId}Delete the office from a Person
OfficeApiGetOfficeGet /organizations/{organizationId}/offices/{officeId}Get an Office for an Organiaztion
OfficeApiUpdateOfficePut /organizations/{organizationId}/offices/{officeId}Update an Office for an Organization
OrganizationApiAttachOrganizationToIndustryPost /organizations/{organizationId}/industries/{industryId}Add an Organization to an Industry
OrganizationApiCreateCertificationPost /organizations/{organizationId}/certificationsCreate a Certification in an Organization
OrganizationApiCreateOfficePost /organizations/{organizationId}/officesCreate an Office in an Organization
OrganizationApiCreateOrganizationPost /organizationsCreate an Organization
OrganizationApiCreateProjectPost /organizations/{organizationId}/projectsCreate a Project in an Organization
OrganizationApiDeleteOfficeDelete /organizations/{organizationId}/offices/{officeId}Delte an Office from an Organization
OrganizationApiDeleteOrganizationDelete /organizations/{organizationId}Delete an organization
OrganizationApiDetachOrganizationFromIndustryDelete /organizations/{organizationId}/industries/{industryId}Remove an Organization to an Industry
OrganizationApiGetCertificationsForOrganizationGet /organizations/{organizationId}/certificationsGet a list of all certifications for a organization
OrganizationApiGetOfficeGet /organizations/{organizationId}/offices/{officeId}Get an Office for an Organiaztion
OrganizationApiGetOrganizationGet /organizations/{organizationId}Get details about an Organization
OrganizationApiGetOrganizationProjectsGet /organizations/{organizationId}/projectsGet a list of all Projects for an Organization
OrganizationApiGetOrganizationsGet /organizationsGet a list of all Organizations
OrganizationApiUpdateOfficePut /organizations/{organizationId}/offices/{officeId}Update an Office for an Organization
OrganizationApiUpdateOrganizationPut /organizations/{organizationId}Update an Organization
PersonApiAddPersonCertificationPost /persons/{personId}/certifications/{certificationId}Add Certification to a Person
PersonApiAddPersonInterestPost /persons/{personId}/interests/skills/{skillId}Add an Interest to a Person
PersonApiAddPersonOfficePost /persons/{personId}/offices/{officeId}Assing a person to an office
PersonApiAddPersonProjectPost /persons/{personId}/projects/{projectId}Add Project to a Person
PersonApiAddPersonProjectSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}Add Skill to a Project participation
PersonApiAddPersonSkillExperiencePost /persons/{personId}/experiences/skills/{skillId}Add an Skill experience to a Person
PersonApiAddPersonSkillExperiencesPost /persons/{personId}/experiencesAdd an Skill experience to a Person (bulk)
PersonApiConfirmSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Confirm Skill
PersonApiCreateAvailabilityPost /persons/{personId}/availabilitiesCreate a availability for a person
PersonApiCreatePersonPost /personsCreate a new Person
PersonApiDeleteAvailabilityDelete /persons/{personId}/availabilities/{availabilityId}Delete a person availability
PersonApiDeleteConfirmationDelete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Remove a confirmation
PersonApiDeletePersonDelete /persons/{personId}Delete an existing Person
PersonApiDeletePersonCertificationDelete /persons/{personId}/certifications/{certificationId}Remove an Interest to a Person
PersonApiDeletePersonInterestDelete /persons/{personId}/interests/skills/{skillId}Remove an Interest to a Person
PersonApiDeletePersonOfficeDelete /persons/{personId}/offices/{officeId}Delete the office from a Person
PersonApiDeletePersonProjectDelete /persons/{personId}/projects/{projectId}Remove an Project from a Person
PersonApiDeletePersonProjectSkillDelete /persons/{personId}/projects/{projectId}/skills/{skillId}Remove a Skill from a Project participation
PersonApiDeletePersonSkillExperienceDelete /persons/{personId}/experiences/skills/{skillId}Remove an Skill Experience to a Person
PersonApiDeletePersonSkillExperiencesDelete /persons/{personId}/experiencesRemove an Skill Experience to a Person
PersonApiGeneratePersonProfileGet /persons/{personid}/profileGenerate a PDF profile from a Person
PersonApiGetAvailabilitiesGet /persons/{personId}/availabilitiesGet a list of all activities for a person
PersonApiGetPersonGet /persons/{personId}Get basic info about a person
PersonApiSearchPersonsPost /persons/searchComplex search over person entities
PersonApiUpdateAvailabilityPut /persons/{personId}/availabilities/{availabilityId}Update a person availability
PersonApiUpdatePersonPut /persons/{personId}Update an existing Person
PersonApiUpdatePersonCertificationPut /persons/{personId}/certifications/{certificationId}Update a Certification of a Person
PersonApiUpdatePersonProjectPut /persons/{personId}/projects/{projectId}Update a Project of a Person
PersonApiUpdatePersonProjectSkillPut /persons/{personId}/projects/{projectId}/skills/{skillId}Update the level of a Skill in a Project participation
PersonApiUpdatePersonSkillExperiencePut /persons/{personId}/experiences/skills/{skillId}Edit an Skill experience to a Person
PersonApiUpdatePersonSkillExperiencesPut /persons/{personId}/experiencesEdit an Skill experience to a Person
ProjectApiAddPersonProjectPost /persons/{personId}/projects/{projectId}Add Project to a Person
ProjectApiAddPersonProjectSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}Add Skill to a Project participation
ProjectApiConfirmSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Confirm Skill
ProjectApiCreateProjectPost /organizations/{organizationId}/projectsCreate a Project in an Organization
ProjectApiDeleteConfirmationDelete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Remove a confirmation
ProjectApiDeletePersonProjectDelete /persons/{personId}/projects/{projectId}Remove an Project from a Person
ProjectApiDeletePersonProjectSkillDelete /persons/{personId}/projects/{projectId}/skills/{skillId}Remove a Skill from a Project participation
ProjectApiDeleteProjectDelete /projects/{projectId}Delete a project
ProjectApiGetOrganizationProjectsGet /organizations/{organizationId}/projectsGet a list of all Projects for an Organization
ProjectApiGetProjectGet /projects/{projectId}Get details about a Project
ProjectApiSearchProjectsPost /projects/searchComplex search over project entities
ProjectApiUpdatePersonProjectPut /persons/{personId}/projects/{projectId}Update a Project of a Person
ProjectApiUpdatePersonProjectSkillPut /persons/{personId}/projects/{projectId}/skills/{skillId}Update the level of a Skill in a Project participation
ProjectApiUpdateProjectPut /projects/{projectId}Update a Project
SearchApiSearchAllGet /search/all/{text}Fulltext search on all kinds of objects
SkillApiAddPersonInterestPost /persons/{personId}/interests/skills/{skillId}Add an Interest to a Person
SkillApiAddPersonProjectSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}Add Skill to a Project participation
SkillApiAddPersonSkillExperiencePost /persons/{personId}/experiences/skills/{skillId}Add an Skill experience to a Person
SkillApiAddPersonSkillExperiencesPost /persons/{personId}/experiencesAdd an Skill experience to a Person (bulk)
SkillApiAddSkillToCertificationPost /certifications/{certificationId}/skills/{skillId}
SkillApiAddSkillToParentSkillPost /skills/{skillId}/parents/{parentSkillId}Attach a Skill to a parent Skill, returns the parent Skill
SkillApiConfirmSkillPost /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Confirm Skill
SkillApiCreateSkillPost /skillsCreate a Skill
SkillApiDeleteConfirmationDelete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId}Remove a confirmation
SkillApiDeletePersonInterestDelete /persons/{personId}/interests/skills/{skillId}Remove an Interest to a Person
SkillApiDeletePersonProjectSkillDelete /persons/{personId}/projects/{projectId}/skills/{skillId}Remove a Skill from a Project participation
SkillApiDeletePersonSkillExperienceDelete /persons/{personId}/experiences/skills/{skillId}Remove an Skill Experience to a Person
SkillApiDeletePersonSkillExperiencesDelete /persons/{personId}/experiencesRemove an Skill Experience to a Person
SkillApiDeleteSkillDelete /skills/{skillId}Delete a Skill
SkillApiDeleteSkillFromCertificationDelete /certifications/{certificationId}/skills/{skillId}
SkillApiGetSkillGet /skills/{skillId}Get details for a single skill
SkillApiGetSkillParentsGet /skills/{skillId}/parentsGet ghe list of parents for a skill
SkillApiGetSkillsGet /skillsGet a list of all skills, optionally only root, optionally only kinds
SkillApiRemoveSkillFromParentSkillDelete /skills/{skillId}/parents/{parentSkillId}Detaches a Skill from parent Skill, return the parent Skill
SkillApiUpdatePersonProjectSkillPut /persons/{personId}/projects/{projectId}/skills/{skillId}Update the level of a Skill in a Project participation
SkillApiUpdatePersonSkillExperiencePut /persons/{personId}/experiences/skills/{skillId}Edit an Skill experience to a Person
SkillApiUpdatePersonSkillExperiencesPut /persons/{personId}/experiencesEdit an Skill experience to a Person
SkillApiUpdateSkillPut /skills/{skillId}Update a Skill
SkillApiUpdateSkillInCertificationPut /certifications/{certificationId}/skills/{skillId}
StatusApiGetPingGet /pingServer heartbeat operation
StatusApiGetVersionGet /versionInformation about the server

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author