kbcommon

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package kbcommon implements base library for go client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseLocationHeader

func ParseLocationHeader(location string) string

ParseLocationHeader parses the given location header and returns the path (removes hostname, port)

Types

type KillbillError

type KillbillError struct {
	// HTTPCode - http return code
	HTTPCode int

	// cause class name
	CauseClassName string `json:"causeClassName,omitempty"`

	// cause message
	CauseMessage string `json:"causeMessage,omitempty"`

	// class name
	ClassName string `json:"className,omitempty"`

	// code
	Code int `json:"code,omitempty"`

	// message
	Message string `json:"message,omitempty"`

	// stack trace
	StackTrace []*StackTraceLine `json:"stackTrace"`
}

KillbillError - default error message when an operation fails.

func NewKillbillError

func NewKillbillError(httpCode int) *KillbillError

NewKillbillError creates new error

func (*KillbillError) Error

func (k *KillbillError) Error() string

Error returns error message

func (*KillbillError) FormatFull

func (k *KillbillError) FormatFull() string

FormatFull formats all the fields of this error.

func (*KillbillError) FormatStackTrace

func (k *KillbillError) FormatStackTrace() string

FormatStackTrace returns formatted stack trace.

type StackTraceLine

type StackTraceLine struct {
	// class name
	ClassName string `json:"className,omitempty"`

	// file name
	FileName string `json:"fileName,omitempty"`

	// is native method
	IsNativeMethod *bool `json:"isNativeMethod,omitempty"`

	// line number
	LineNumber int32 `json:"lineNumber,omitempty"`

	// method name
	MethodName string `json:"methodName,omitempty"`
}

StackTraceLine represents a line of stack trace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL