Documentation ¶
Overview ¶
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Copyright (c) 2015-2018 Nexenta Systems, Inc. * * This file is part of EdgeFS Project * (see https://github.com/Nexenta/edgefs). * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
Index ¶
- Constants
- Variables
- func AuthKey(authkey string) string
- func CacheAuthKey(cluster string, tenant string, user *User) string
- func CacheUserKey(cluster string, tenant string, user *User) string
- func CheckService(svc string) bool
- func CompletionAttribute(c unsafe.Pointer, name string) (string, error)
- func DeleteUser(cluster string, tenant string, user *User) error
- func GetBytes(s string) (int64, error)
- func GetFUNC(depthList ...int) string
- func GetKeyValues(cl string, tn string, bk string, obj string, pat string, max_len int, ...) (map[string]string, error)
- func GetKeys(cl string, tn string, bk string, obj string) ([]string, error)
- func GetLibccowConf() ([]byte, error)
- func GetMDKey(cl string, tn string, bk string, obj string, key string) (string, error)
- func GetMDPat(cl string, tn string, bk string, obj string, pat string) (map[string]string, error)
- func GetServerId() ([]byte, error)
- func HasCustomAttributes(flags []FlagValue) bool
- func InheritBucketAttributes(c unsafe.Pointer, bucket map[string]string) error
- func IsSystemName(cl string) bool
- func K8sServiceUp(sname string) error
- func MatchUser(cluster string, tenant string, user *User, password string) bool
- func ModifyCustomAttributes(cl string, tn string, bk string, obj string, flags []FlagValue) error
- func ModifyDefaultAttributes(c unsafe.Pointer, flags []FlagValue) error
- func PrintUser(user *User)
- func RandomString(size int) string
- func ReadAttributes(options map[string]string, flagNames []string, flags []FlagValue)
- func SaveUser(cluster string, tenant string, user *User) error
- func UpdateMD(cl string, tn string, bk string, obj string, key string, value string) error
- func UpdateMDMany(cl string, tn string, bk string, obj string, par []KeyValue) error
- func UserKey(username string) string
- func ValidateFlags(flags []FlagValue) error
- type Address
- type ECMode
- type Endpoints
- type Event
- type EventType
- type FlagValue
- type K8sClient
- type KeyValue
- type Metadata
- type ObjectReference
- type Port
- type Subset
- type User
Constants ¶
const CUSTOM_ATTRIBUTES int = -1
Variables ¶
var ECCodecString = [...]string{"none", "xor", "rs", "cauchy"}
Functions ¶
func CheckService ¶
func GetKeyValues ¶
func GetLibccowConf ¶
func GetServerId ¶
func HasCustomAttributes ¶
func InheritBucketAttributes ¶
func IsSystemName ¶
func K8sServiceUp ¶
Service calls this function after it is certain that it is up and running, so that we can update service metadata with dynamic info
func ModifyCustomAttributes ¶
func ModifyDefaultAttributes ¶
func RandomString ¶
RandomString generates a random string for S3 key, secret auth
func ReadAttributes ¶
func UpdateMDMany ¶
func ValidateFlags ¶
Types ¶
type Address ¶
type Address struct { IP string `json:"ip"` TargetRef *ObjectReference `json:"targetRef,omitempty"` }
type ECMode ¶
func (*ECMode) DecodeString ¶
type K8sClient ¶
type K8sClient interface { Do(req *http.Request) (*http.Response, error) GetRequest(url string) (*http.Request, error) Host() string GetEndpoints(namespace, targetName string) (Endpoints, error) }
K8sClient is minimal kubernetes client interface
func NewInClusterK8sClient ¶
NewInClusterK8sClient creates K8sClient if it is inside Kubernetes
func NewInsecureK8sClient ¶
NewInsecureK8sClient creates an insecure k8s client which is suitable to connect kubernetes api behind proxy
type ObjectReference ¶
type User ¶
type User struct { Username string `json:"username"` Hash string `json:"hash"` Type string `json:"type"` Identity string `json:"identity"` Admin int `json:"admin"` // s3 authentication keys Authkey string `json:"authkey"` Secret string `json:"secret"` }
User - general user structure