github.com/antihax/goesi@v0.0.0-20240126031043-6c54d0cb7f95/meta/configuration.go (about)

     1  /*
     2   * ESI Meta Spec
     3   *
     4   * ESI specs and miscellaneous routes
     5   *
     6   * OpenAPI spec version: 0.1
     7   *
     8   * Generated by: https://github.com/swagger-api/swagger-codegen.git
     9   *
    10   * Licensed under the Apache License, Version 2.0 (the "License");
    11   * you may not use this file except in compliance with the License.
    12   * You may obtain a copy of the License at
    13   *
    14   *      http://www.apache.org/licenses/LICENSE-2.0
    15   *
    16   * Unless required by applicable law or agreed to in writing, software
    17   * distributed under the License is distributed on an "AS IS" BASIS,
    18   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    19   * See the License for the specific language governing permissions and
    20   * limitations under the License.
    21   */
    22  
    23  package meta
    24  
    25  // Handle our context keys.
    26  type contextKey string
    27  
    28  func (c contextKey) String() string {
    29  	return "auth " + string(c)
    30  }
    31  
    32  // ContextOAuth2 is the context for GoESI authentication. Pass a tokenSource with this key to a context for an ESI API Call
    33  var (
    34  	ContextOAuth2      = contextKey("token")
    35  	ContextBasicAuth   = contextKey("basic")
    36  	ContextAccessToken = contextKey("accessToken")
    37  )
    38  
    39  type BasicAuth struct {
    40  	UserName string `json:"userName,omitempty"`
    41  	Password string `json:"password,omitempty"`
    42  }
    43  
    44  /*
    45  	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
    46  	APIKey        map[string]string `json:"APIKey,omitempty"`
    47  */