<commit_before>package model

import (
	"bytes"
	"time"

	kubeModels "git.containerum.net/ch/kube-client/pkg/model"
	"github.com/olekukonko/tablewriter"
)

var (
	_ TableRenderer = &Namespace{}
	_ TableRenderer = &NamespaceList{}
)

type NamespaceList []Namespace

func NamespaceListFromKube(kubeList []kubeModels.Namespace) NamespaceList {
	var list NamespaceList = make([]Namespace, 0, len(kubeList))
	for _, namespace := range kubeList {
		list = append(list, NamespaceFromKube(namespace))
	}
	return list
}

func (_ NamespaceList) TableHeaders() []string {
	return new(Namespace).TableHeaders()
}

func (list NamespaceList) TableRows() [][]string {
	row := make([][]string, 0, len(list))
	for _, ns := range list {
		row = append(row, ns.TableRows()...)
	}
	return row
}

type Namespace struct {
	CreatedAt *time.Time
	Label     string
	Access    string
	Volumes   []Volume
}

func (_ *Namespace) TableHeaders() []string {
	return []string{"Label", "Created", "Access", "Volumes"}
}

func (namespace *Namespace) TableRows() [][]string {
	creationTime := ""
	if namespace.CreatedAt != nil {
		creationTime = namespace.CreatedAt.Format(CreationTimeFormat)
	}
	volumes := ""
	for i, volume := range namespace.Volumes {
		if i > 0 {
			volumes += "\n" + volume.Label
		}
		volumes += volume.Label
	}
	return [][]string{{
		namespace.Label,
		creationTime,
		namespace.Access,
		volumes,
	}}
}

func (namespace *Namespace) RenderTable() string {
	return RenderTable(namespace)
}
func NamespaceFromKube(kubeNameSpace kubeModels.Namespace) Namespace {
	ns := Namespace{
		Label:  kubeNameSpace.Label,<commit_msg>rm access data from table representation<commit_after>package model

import (
	"bytes"
	"time"

	kubeModels "git.containerum.net/ch/kube-client/pkg/model"
	"github.com/olekukonko/tablewriter"
)

var (
	_ TableRenderer = &Namespace{}
	_ TableRenderer = &NamespaceList{}
)

type NamespaceList []Namespace

func NamespaceListFromKube(kubeList []kubeModels.Namespace) NamespaceList {
	var list NamespaceList = make([]Namespace, 0, len(kubeList))
	for _, namespace := range kubeList {
		list = append(list, NamespaceFromKube(namespace))
	}
	return list
}

func (_ NamespaceList) TableHeaders() []string {
	return new(Namespace).TableHeaders()
}

func (list NamespaceList) TableRows() [][]string {
	row := make([][]string, 0, len(list))
	for _, ns := range list {
		row = append(row, ns.TableRows()...)
	}
	return row
}

type Namespace struct {
	CreatedAt *time.Time
	Label     string
	Access    string
	Volumes   []Volume
}

func (_ *Namespace) TableHeaders() []string {
	return []string{"Label", "Created" /* "Access",*/, "Volumes"}
}

func (namespace *Namespace) TableRows() [][]string {
	creationTime := ""
	if namespace.CreatedAt != nil {
		creationTime = namespace.CreatedAt.Format(CreationTimeFormat)
	}
	volumes := ""
	for i, volume := range namespace.Volumes {
		if i > 0 {
			volumes += "\n" + volume.Label
		}
		volumes += volume.Label
	}
	return [][]string{{
		namespace.Label,
		creationTime,
		//namespace.Access,
		volumes,
	}}
}

func (namespace *Namespace) RenderTable() string {
	return RenderTable(namespace)
}
func NamespaceFromKube(kubeNameSpace kubeModels.Namespace) Namespace {
	ns := Namespace{
		Label:  kubeNameSpace.Label,
{'fraction_non_alphanumeric': 0.13899138991389914, 'fraction_numerical': 0.0018450184501845018, 'mean_word_length': 4.618307426597582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '200056', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1083, 'n_words': 254}