v1

package
v0.0.0-...-1fec092 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   "sip",
	Version: "v1",
}

Define your schema name and the version

Functions

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Header string
const (
	CallID        Header = "Call-ID"
	Contact       Header = "Contact"
	ContentLength Header = "Content-Length"
	CSeq          Header = "CSeq"
	From          Header = "From"
	To            Header = "To"
	Via           Header = "Via"
)

func (Header) String

func (h Header) String() string

type Method

type Method string
const (
	Ack      Method = "ACK"
	Bye      Method = "BYE"
	Cancel   Method = "CANCEL"
	Invite   Method = "INVITE"
	Options  Method = "OPTIONS"
	Register Method = "REGISTER"
)

func MethodFromString

func MethodFromString(s string) (Method, bool)

func (Method) String

func (m Method) String() string

type RequestLine

type RequestLine struct {
	Method     Method     `json:"method"`
	RequestURI string     `json:"request-uri"`
	SIPVersion SIPVersion `json:"sip-version"`
}

+k8s:deepcopy-gen=true

func (*RequestLine) DeepCopy

func (in *RequestLine) DeepCopy() *RequestLine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestLine.

func (*RequestLine) DeepCopyInto

func (in *RequestLine) DeepCopyInto(out *RequestLine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPCall

type SIPCall struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              SIPCallSpec   `json:"spec"`
	Status            SIPCallStatus `json:"status"`
}

+genclient +genclient:noStatus +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func NewSIPCall

func NewSIPCall(sipMessage *SIPMessage) *SIPCall

func (*SIPCall) DeepCopy

func (in *SIPCall) DeepCopy() *SIPCall

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPCall.

func (*SIPCall) DeepCopyInto

func (in *SIPCall) DeepCopyInto(out *SIPCall)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SIPCall) DeepCopyObject

func (in *SIPCall) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SIPCallList

type SIPCallList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []SIPCall `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SIPCallList) DeepCopy

func (in *SIPCallList) DeepCopy() *SIPCallList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPCallList.

func (*SIPCallList) DeepCopyInto

func (in *SIPCallList) DeepCopyInto(out *SIPCallList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SIPCallList) DeepCopyObject

func (in *SIPCallList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SIPCallMessage

type SIPCallMessage struct {
	ID           string      `json:"id"`
	Method       Method      `json:"method"`
	StatusCode   int         `json:"status-code"`
	ReasonPhrase string      `json:"reason-phrase"`
	Created      metav1.Time `json:"created"`
}

+k8s:deepcopy-gen=true

func (*SIPCallMessage) DeepCopy

func (in *SIPCallMessage) DeepCopy() *SIPCallMessage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPCallMessage.

func (*SIPCallMessage) DeepCopyInto

func (in *SIPCallMessage) DeepCopyInto(out *SIPCallMessage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPCallSpec

type SIPCallSpec struct {
	SbcID    string           `json:"sbc-id"`
	Messages []SIPCallMessage `json:"messages"`
}

+k8s:deepcopy-gen=true

func (*SIPCallSpec) DeepCopy

func (in *SIPCallSpec) DeepCopy() *SIPCallSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPCallSpec.

func (*SIPCallSpec) DeepCopyInto

func (in *SIPCallSpec) DeepCopyInto(out *SIPCallSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPCallStatus

type SIPCallStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

+k8s:deepcopy-gen=true

func (*SIPCallStatus) DeepCopy

func (in *SIPCallStatus) DeepCopy() *SIPCallStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPCallStatus.

func (*SIPCallStatus) DeepCopyInto

func (in *SIPCallStatus) DeepCopyInto(out *SIPCallStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPMessage

type SIPMessage struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              SIPMessageSpec   `json:"spec"`
	Status            SIPMessageStatus `json:"status"`
}

+genclient +genclient:noStatus +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SIPMessage) DeepCopy

func (in *SIPMessage) DeepCopy() *SIPMessage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPMessage.

func (*SIPMessage) DeepCopyInto

func (in *SIPMessage) DeepCopyInto(out *SIPMessage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SIPMessage) DeepCopyObject

func (in *SIPMessage) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*SIPMessage) GetHeader

func (m *SIPMessage) GetHeader(headerStr string) ([]string, bool)

GetHeader returns a slice of strings of values for that header name and a bool if it exists

func (*SIPMessage) MarshalToSIP

func (m *SIPMessage) MarshalToSIP() ([]byte, error)

MarshalToSIP parses the SIPMessage object and returns a valid SIP message

func (*SIPMessage) Unmarshal

func (m *SIPMessage) Unmarshal(data []byte) error

Unmarshal parses a SIP message stored in a byte slice and stores it in a SIPMessage object

type SIPMessageList

type SIPMessageList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []SIPMessage `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SIPMessageList) DeepCopy

func (in *SIPMessageList) DeepCopy() *SIPMessageList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPMessageList.

func (*SIPMessageList) DeepCopyInto

func (in *SIPMessageList) DeepCopyInto(out *SIPMessageList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SIPMessageList) DeepCopyObject

func (in *SIPMessageList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SIPMessageSpec

type SIPMessageSpec struct {
	RequestLine *RequestLine        `json:"request-line"`
	StatusLine  *StatusLine         `json:"status-line"`
	Headers     map[string][]string `json:"headers"`
	Body        []byte              `json:"body"`
}

+k8s:deepcopy-gen=true

func (*SIPMessageSpec) DeepCopy

func (in *SIPMessageSpec) DeepCopy() *SIPMessageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPMessageSpec.

func (*SIPMessageSpec) DeepCopyInto

func (in *SIPMessageSpec) DeepCopyInto(out *SIPMessageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPMessageStatus

type SIPMessageStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

+k8s:deepcopy-gen=true

func (*SIPMessageStatus) DeepCopy

func (in *SIPMessageStatus) DeepCopy() *SIPMessageStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SIPMessageStatus.

func (*SIPMessageStatus) DeepCopyInto

func (in *SIPMessageStatus) DeepCopyInto(out *SIPMessageStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SIPVersion

type SIPVersion string
const (
	SIP20 SIPVersion = "SIP/2.0"
)

func VersionFromString

func VersionFromString(s string) (SIPVersion, bool)

func (SIPVersion) String

func (v SIPVersion) String() string

type StatusCode

type StatusCode int
const (
	// Informational
	Trying               StatusCode = 100
	Ringing              StatusCode = 180
	CallIsBeingForwarded StatusCode = 181
	Queued               StatusCode = 182
	SessionProgress      StatusCode = 183
	// Success
	OK StatusCode = 200
	// Redirection
	MultipleChoices    StatusCode = 300
	MovedPermanently   StatusCode = 301
	MovedTemporarily   StatusCode = 302
	UseProxy           StatusCode = 305
	AlternativeService StatusCode = 380
	// Client-Error
	BadRequest                       StatusCode = 400
	Unauthorized                     StatusCode = 401
	PaymentRequired                  StatusCode = 402
	Forbidden                        StatusCode = 403
	NotFound                         StatusCode = 404
	MethodNotAllowed                 StatusCode = 405
	NotAcceptable                    StatusCode = 406
	ProxyAuthenticationRequired      StatusCode = 407
	RequestTimeout                   StatusCode = 408
	Gone                             StatusCode = 410
	RequestEntityTooLarge            StatusCode = 413
	RequestURITooLarge               StatusCode = 414
	UnsupportedMediaType             StatusCode = 415
	UnsupportedURIScheme             StatusCode = 416
	BadExtension                     StatusCode = 420
	ExtensionRequired                StatusCode = 421
	IntervalTooBrief                 StatusCode = 423
	TemporarilyNotAvailable          StatusCode = 480
	CallLegOrTransactionDoesNotExist StatusCode = 481
	LoopDetected                     StatusCode = 482
	TooManyHops                      StatusCode = 483
	AddressIncomplete                StatusCode = 484
	Ambiguous                        StatusCode = 485
	BusyHere                         StatusCode = 486
	RequestTerminated                StatusCode = 487
	NotAcceptableHere                StatusCode = 488
	RequestPending                   StatusCode = 491
	Undecipherable                   StatusCode = 493
	// Server-Error
	InternalServerError    StatusCode = 500
	NotImplemented         StatusCode = 501
	BadGateway             StatusCode = 502
	ServiceUnavailable     StatusCode = 503
	ServerTimeOut          StatusCode = 504
	SIPVersionNotSupported StatusCode = 505
	MessageTooLarge        StatusCode = 513
	// Global-Failure
	BusyEverywhere       StatusCode = 600
	Decline              StatusCode = 603
	DoesNotExistAnywhere StatusCode = 604
	GlobalNotAcceptable  StatusCode = 606 // Not Acceptable
)

RFC 3261 Sections 25.1

type StatusLine

type StatusLine struct {
	SIPVersion   SIPVersion `json:"sip-version"`
	StatusCode   int        `json:"status-code"`
	ReasonPhrase string     `json:"reason-phrase"`
}

+k8s:deepcopy-gen=true

func (*StatusLine) DeepCopy

func (in *StatusLine) DeepCopy() *StatusLine

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusLine.

func (*StatusLine) DeepCopyInto

func (in *StatusLine) DeepCopyInto(out *StatusLine)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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