You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: manager_k8s.go
    path of file: ./repos/botkube/pkg/config
    
    the code of the file until where you have to start completion: package config

import (
	"context"

	"github.com/sirupsen/logrus"
	"k8s.io/client-go/kubernetes"
)

// K8sConfigPersistenceManager manages persistence of the configuration.
type K8sConfigPersistenceManager struct {
	log    logrus.FieldLogger
	cfg    PersistentConfig
	k8sCli kubernetes.Interface
}

var _ PersistenceManager = (*K8sConfigPersistenceManager)(nil)

// PersistSourceBindings persists source bindings configuration for a given channel in a given platform.
func (m *K8sConfigPersistenceManager) PersistSourceBindings(ctx context.Context, commGroupName string, platform CommPlatformIntegration, channelAlias string, sourceBindings []string) error {
	if _, ok := supportedPlatformsSourceBindings[platform]; !ok {
		return ErrUnsupportedPlatform
	}

	configMapStorage := configMapStorage[RuntimeState]{k8sCli: m.k8sCli, cfg: m.cfg.Runtime}

	state, cm, err := configMapStorage.Get(ctx)
	if err != nil {
		return err
	}

	if state.Communications == nil {
		state.Communications = make(map[string]CommunicationsRuntimeState)
	}

	commGroup, exists := state.Communications[commGroupName]
	if !exists {
		commGroup = make(CommunicationsRuntimeState)
		state.Communications[commGroupName] = commGroup
	}

	platformCfg, exists := commGroup[platform]
	if !exists {
		platformCfg = BotRuntimeState{}
		state.Communications[commGroupName][platform] = platformCfg
	}

	if platform == TeamsCommPlatformIntegration {
		if platformCfg.MSTeamsOnlyRuntimeState == nil {
			platformCfg.MSTeamsOnlyRuntimeState = &ChannelRuntimeState{}
		}

		platformCfg.MSTeamsOnlyRuntimeState.Bindings.Sources = sourceBindings
		state.Communications[commGroupName][platform] = platformCfg

		err = configMapStorage.Update(ctx, cm, state)
		if err != nil {
			retu
    
func (m *K8sConfigPersistenceManager) PersistSourceBindings(ctx context.Context, commGroupName string, platform CommPlatformIntegration, channelAlias string, sourceBindings []string) error {
	if _, ok := supportedPlatformsSourceBindings[platform]; !ok {
		return ErrUnsupportedPlatform
	}

	configMapStorage := configMapStorage[RuntimeState]{k8sCli: m.k8sCli, cfg: m.cfg.Runtime}

	state, cm, err := configMapStorage.Get(ctx)
	if err != nil {
		return err
	}

	if state.Communications == nil {
		state.Communications = make(map[string]CommunicationsRuntimeState)
	}

	commGroup, exists := state.Communications[commGroupName]
	if !exists {
		commGroup = make(CommunicationsRuntimeState)
		state.Communications[commGroupName] = commGroup
	}

	platformCfg, exists := commGroup[platform]
	if !exists {
		platformCfg = BotRuntimeState{}
		state.Communications[commGroupName][platform] = platformCfg
	}

	if platform == TeamsCommPlatformIntegration {
		if platformCfg.MSTeamsOnlyRuntimeState == nil {
			platformCfg.MSTeamsOnlyRuntimeState = &ChannelRuntimeState{}
		}

		platformCfg.MSTeamsOnlyRuntimeState.Bindings.Sources = sourceBindings
		state.Communications[commGroupName][platform] = platformCfg

		err = configMapStorage.Update(ctx, cm, state)
		if err != nil {
			return err
		}

		return nil
	}

	if platformCfg.Channels == nil {
		platformCfg.Channels = make(map[string]ChannelRuntimeState)
		state.Communications[commGroupName][platform] = platformCfg
	}

	channel, exists := platformCfg.Channels[channelAlias]
	if !exists {
		channel = ChannelRuntimeState{}
	}

	channel.Bindings.Sources = sourceBindings
	state.Communications[commGroupName][platform].Channels[channelAlias] = channel

	err = configMapStorage.Update(ctx, cm, state)
	if err != nil {
		return err
	}

	return nil
}