// getRawEventName is used to get the raw event name
763224
func (s *SerfEventHandler) getRawEventName(name string) string {
	return strings.TrimPrefix(name, s.ServicePrefix+":")
}
308774
func (ms *messageSerializer) getWebsocketCustomEvent(websocketMessage []byte) []byte {
	if len(websocketMessage) < ms.prefixAndSepIdx {
		return nil
	}
	s := websocketMessage[ms.prefixAndSepIdx:]
	evt := s[:bytes.IndexByte(s, messageSeparatorByte)]
	return evt
}
238963
func (r *Repository) GetEventsURL() string {
	if r == nil || r.EventsURL == nil {
		return ""
	}
	return *r.EventsURL
}
1192855
func (rtm *RTM) handleRawEvent(rawEvent json.RawMessage) string {
	event := &Event{}
	err := json.Unmarshal(rawEvent, event)
	if err != nil {
		rtm.IncomingEvents <- RTMEvent{"unmarshalling_error", &UnmarshallingErrorEvent{err}}
		return ""
	}

	switch event.Type {
	case rtmEventTypeAck:
		rtm.handleAck(rawEvent)
	case rtmEventTypeHello:
		rtm.IncomingEvents <- RTMEvent{"hello", &HelloEvent{}}
	case rtmEventTypePong:
		rtm.handlePong(rawEvent)
	case rtmEventTypeGoodbye:
		// just return the event type up for goodbye, will be handled by caller.
	case rtmEventTypeDesktopNotification:
		rtm.Debugln("Received desktop notification, ignoring")
	default:
		rtm.handleEvent(event.Type, rawEvent)
	}

	return event.Type
}
1019082
func (n *Network) GetBridgeName() (string, error) {
	var err C.virError
	result := C.virNetworkGetBridgeNameWrapper(n.ptr, &err)
	if result == nil {
		return "", makeError(&err)
	}
	bridge := C.GoString(result)
	C.free(unsafe.Pointer(result))
	return bridge, nil
}
879646
func (r Event_Log) GetAllEventNames(objectName *string) (resp []string, err error) {
	params := []interface{}{
		objectName,
	}
	err = r.Session.DoRequest("SoftLayer_Event_Log", "getAllEventNames", params, &r.Options, &resp)
	return
}
1003492
func (t *Template) GetAWSLambdaEventSourceMappingWithName(name string) (*resources.AWSLambdaEventSourceMapping, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSLambdaEventSourceMapping:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSLambdaEventSourceMapping not found", name)
}
1068013
func (r *Client) GetDatasourceByName(name string) (Datasource, error) {
	var (
		raw  []byte
		ds   Datasource
		code int
		err  error
	)
	if raw, code, err = r.get(fmt.Sprintf("api/datasources/name/%s", name), nil); err != nil {
		return ds, err
	}
	if code != 200 {
		return ds, fmt.Errorf("HTTP error %d: returns %s", code, raw)
	}
	err = json.Unmarshal(raw, &ds)
	return ds, err
}
126732
func (n *Network) GetName() (string, error) {
	var err C.virError
	name := C.virNetworkGetNameWrapper(n.ptr, &err)
	if name == nil {
		return "", makeError(&err)
	}
	return C.GoString(name), nil
}
1323238
func (s *Shape) PayloadRefName() string {
	if name := s.Payload; len(name) != 0 {
		// Root shape
		return name
	}

	for name, ref := range s.MemberRefs {
		if ref.IsEventPayload {
			return name
		}
	}

	return ""
}
1013137
func (p *PreReceiveHook) GetName() string {
	if p == nil || p.Name == nil {
		return ""
	}
	return *p.Name
}
608321
func (g *srvGateway) getName() string {
	g.RLock()
	n := g.name
	g.RUnlock()
	return n
}
855555
func (c *Connect) GetHostname() (string, error) {
	var err C.virError
	str := C.virConnectGetHostnameWrapper(c.ptr, &err)
	if str == nil {
		return "", makeError(&err)
	}
	hostname := C.GoString(str)
	C.free(unsafe.Pointer(str))
	return hostname, nil
}
1257849
func (l *LabelResult) GetName() string {
	if l == nil || l.Name == nil {
		return ""
	}
	return *l.Name
}
501876
func (f *Feed) GetEventURLs() ([]string, error) {
	s := make([]string, len(f.Entry))
	for i := 0; i < len(f.Entry); i++ {
		e := f.Entry[i]
		s[i] = strings.TrimRight(e.Link[1].Href, "/")
	}
	return s, nil
}
1229040
func (p *PushEventRepository) GetFullName() string {
	if p == nil || p.FullName == nil {
		return ""
	}
	return *p.FullName
}
82020
func (r Network_Subnet_Registration) GetEvents() (resp []datatypes.Network_Subnet_Registration_Event, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Subnet_Registration", "getEvents", nil, &r.Options, &resp)
	return
}