Documentation
¶
Index ¶
- Constants
- Variables
- func CreateBasicAuthHeaderValue(username, password string) string
- type ApiResourceLocation
- type ArgumentNilError
- type ArgumentNilOrEmptyError
- type Client
- func (client *Client) CreateRequestMessage(ctx context.Context, httpMethod string, url string, apiVersion string, ...) (request *http.Request, err error)
- func (client *Client) GenerateUrl(apiResourceLocation *ApiResourceLocation, routeValues map[string]string, ...) (request string)
- func (client *Client) GetResourceAreas(ctx context.Context) (*[]ResourceAreaInfo, error)
- func (client *Client) Send(ctx context.Context, httpMethod string, locationId uuid.UUID, ...) (response *http.Response, err error)
- func (client *Client) SendRequest(request *http.Request) (response *http.Response, err error)
- func (client *Client) UnmarshalBody(response *http.Response, v interface{}) (err error)
- func (client *Client) UnmarshalCollectionBody(response *http.Response, v interface{}) (err error)
- func (client *Client) UnmarshalCollectionJson(jsonValue []byte, v interface{}) (err error)
- func (client *Client) UnwrapError(response *http.Response) (err error)
- type Connection
- type ImproperError
- type InvalidApiVersion
- type InvalidVersionStringError
- type KeyValuePair
- type LocationIdNotRegisteredError
- type ResourceAreaIdNotRegisteredError
- type ResourceAreaInfo
- type ServerSystemError
- type Time
- type Version
- type VssJsonCollectionWrapper
- type WrappedError
- type WrappedImproperError
Constants ¶
View Source
const ( HeaderKeyContinuationToken = "X-MS-ContinuationToken" // media types MediaTypeTextPlain = "text/plain" MediaTypeApplicationJson = "application/json" )
Variables ¶
View Source
var SessionId = uuid.New().String()
Unique session id to be used by all requests of this session.
Functions ¶
Types ¶
type ApiResourceLocation ¶
type ApiResourceLocation struct {
// Area name for this resource
Area *string `json:"area,omitempty"`
// Unique Identifier for this location
Id *uuid.UUID `json:"id,omitempty"`
// Maximum api version that this resource supports (current server version for this resource)
MaxVersion *string `json:"maxVersion,omitempty"`
// Minimum api version that this resource supports
MinVersion *string `json:"minVersion,omitempty"`
// The latest version of this resource location that is in "Release" (non-preview) mode
ReleasedVersion *string `json:"releasedVersion,omitempty"`
// Resource name
ResourceName *string `json:"resourceName,omitempty"`
// The current resource version supported by this resource location
ResourceVersion *int `json:"resourceVersion,omitempty"`
// This location's route template (templated relative path)
RouteTemplate *string `json:"routeTemplate,omitempty"`
}
ApiResourceLocation Information about the location of a REST API resource
type ArgumentNilError ¶
type ArgumentNilError struct {
ArgumentName string
}
func (ArgumentNilError) Error ¶
func (e ArgumentNilError) Error() string
type ArgumentNilOrEmptyError ¶
type ArgumentNilOrEmptyError struct {
ArgumentName string
}
func (ArgumentNilOrEmptyError) Error ¶
func (e ArgumentNilOrEmptyError) Error() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(connection *Connection, baseUrl string) *Client
func (*Client) CreateRequestMessage ¶
func (*Client) GenerateUrl ¶
func (*Client) GetResourceAreas ¶
func (client *Client) GetResourceAreas(ctx context.Context) (*[]ResourceAreaInfo, error)
func (*Client) SendRequest ¶
func (*Client) UnmarshalBody ¶
func (*Client) UnmarshalCollectionBody ¶
func (*Client) UnmarshalCollectionJson ¶
type Connection ¶
type Connection struct {
AuthorizationString string
BaseUrl string
UserAgent string
SuppressFedAuthRedirect bool
ForceMsaPassThrough bool
Timeout *time.Duration
TlsConfig *tls.Config
// contains filtered or unexported fields
}
func NewAnonymousConnection ¶
func NewAnonymousConnection(organizationUrl string) *Connection
func NewPatConnection ¶
func NewPatConnection(organizationUrl string, personalAccessToken string) *Connection
Creates a new Azure DevOps connection instance using a personal access token.
func (*Connection) GetClientByResourceAreaId ¶
func (*Connection) GetClientByUrl ¶
func (connection *Connection) GetClientByUrl(baseUrl string) *Client
type ImproperError ¶
type ImproperError struct {
Message *string `json:"Message,omitempty"`
}
ImproperError
type InvalidApiVersion ¶
type InvalidApiVersion struct {
ApiVersion string
}
func (InvalidApiVersion) Error ¶
func (e InvalidApiVersion) Error() string
type InvalidVersionStringError ¶
type InvalidVersionStringError struct {
// contains filtered or unexported fields
}
func (*InvalidVersionStringError) Error ¶
func (e *InvalidVersionStringError) Error() string
type KeyValuePair ¶
type KeyValuePair struct {
Key *interface{} `json:"key,omitempty"`
Value *interface{} `json:"value,omitempty"`
}
KeyValuePair
type LocationIdNotRegisteredError ¶
func (LocationIdNotRegisteredError) Error ¶
func (e LocationIdNotRegisteredError) Error() string
type ResourceAreaIdNotRegisteredError ¶
func (ResourceAreaIdNotRegisteredError) Error ¶
func (e ResourceAreaIdNotRegisteredError) Error() string
type ResourceAreaInfo ¶
type ResourceAreaInfo struct {
Id *uuid.UUID `json:"id,omitempty"`
LocationUrl *string `json:"locationUrl,omitempty"`
Name *string `json:"name,omitempty"`
}
ResourceAreaInfo
type ServerSystemError ¶
type ServerSystemError struct {
ClassName *string `json:"className,omitempty"`
InnerException *ServerSystemError `json:"innerException,omitempty"`
Message *string `json:"message,omitempty"`
}
ServerSystemError
func (ServerSystemError) Error ¶
func (e ServerSystemError) Error() string
type Time ¶
func (Time) AsQueryParameter ¶
AsQueryParameter formats time value for query parameter usage.
func (*Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type Version ¶
func NewVersion ¶
type VssJsonCollectionWrapper ¶
type VssJsonCollectionWrapper struct {
Count *int `json:"count"`
Value *[]interface{} `json:"value"`
}
VssJsonCollectionWrapper -
type WrappedError ¶
type WrappedError struct {
ExceptionId *string `json:"$id,omitempty"`
InnerError *WrappedError `json:"innerException,omitempty"`
Message *string `json:"message,omitempty"`
TypeName *string `json:"typeName,omitempty"`
TypeKey *string `json:"typeKey,omitempty"`
ErrorCode *int `json:"errorCode,omitempty"`
EventId *int `json:"eventId,omitempty"`
CustomProperties *map[string]interface{} `json:"customProperties,omitempty"`
StatusCode *int
}
WrappedError
func (WrappedError) Error ¶
func (e WrappedError) Error() string
type WrappedImproperError ¶
type WrappedImproperError struct {
Count *int `json:"count,omitempty"`
Value *ImproperError `json:"value,omitempty"`
}
WrappedImproperError
Source Files
¶
Click to show internal directories.
Click to hide internal directories.