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.
* 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 AppendStringToFile(fileName string, content string) error
- func AskForConfirmation(s string) bool
- 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 CopyFile(sourceFile string, destinationFile string) error
- func CreateCcowdChannel(timeout_ms int) (*nnchannel, error)
- func CreateNanoMsgChannel(path string, rx_tmo_ms int) (*nnchannel, error)
- func DeleteUser(cluster string, tenant string, user *User) error
- func GetBytes(s string) (int64, error)
- func GetFUNC(depthList ...int) string
- func GetFlexhashJson() ([]byte, error)
- func GetFolderContent(path string) ([]os.FileInfo, error)
- func GetIPv4Address(interfaceName string) (string, error)
- func GetKeyValue(cl string, tn string, bk string, obj string, key string, max_len int) (string, error)
- func GetKeys(cl string, tn string, bk string, obj string, count int) ([]string, error)
- func GetLibccowConf() ([]byte, error)
- func GetMD5HashInt32(str string) uint32
- 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 GetOndemandPolicyString(cl string, tn string, bk string, obj string) (string, error)
- func GetServerId() ([]byte, error)
- func HasCustomAttributes(flags []FlagValue) bool
- func InheritBucketAttributes(c unsafe.Pointer, bucket map[string]string) error
- func IsDirectory(path string) bool
- func IsPrivateIP(ip net.IP) bool
- func IsSystemName(cl string) bool
- func K8sServiceUp(sname string) error
- func ListUser(cluster string, tenant string, count int, name string) error
- func LoadJsonFile(obj interface{}, fileName string) error
- func LookupDNS(dnsname string) (string, error)
- func MarshalToFile(path string, data interface{}) 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 ObjectCreate(cl string, tn string, bk string, obj string) error
- func ObjectDelete(cl string, tn string, bk string, obj string) error
- func ObjectExpunge(cl string, tn string, bk string, obj string) error
- func PrintKeyStrValues(cl string, tn string, bk string, obj string, pat string, cmp int, max_len int, ...) (string, error)
- func PrintKeyValues(cl string, tn string, bk string, obj string, pat string, cmp int, count int, ...) (string, error)
- func PrintKeys(cl string, tn string, bk string, obj string, count int) error
- func PrintMD(cl string, tn string, bk string, obj string) error
- func PrintMDCustom(cl string, tn string, bk string, obj string) error
- func PrintMDPat(cl string, tn string, bk string, obj string, pat string) error
- func PrintUser(user *User)
- func RandomString(size int) string
- func ReadAttributes(cmd *cobra.Command, flagNames []string, flags []FlagValue)
- func ReplaceInFile(fileName string, pattern string, value string) error
- func SaveUser(cluster string, tenant string, user *User) error
- func SetKeyValueAttributes(c unsafe.Pointer) 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
- type ECMode
- type FlagValue
- type KeyValue
- type User
Constants ¶
const CUSTOM_ATTRIBUTES int = -1
Variables ¶
var ECCodecString = [...]string{"none", "xor", "rs", "cauchy"}
Functions ¶
func AppendStringToFile ¶
func AskForConfirmation ¶
func CheckService ¶
func CreateCcowdChannel ¶
Create IPC connection to ccow-daemon's REQ/REP channel
func CreateNanoMsgChannel ¶
Create a nanomessage NN_REQ connection to specified IPC address
func GetFlexhashJson ¶
func GetIPv4Address ¶
func GetKeyValue ¶
func GetLibccowConf ¶
func GetMD5HashInt32 ¶
func GetOndemandPolicyString ¶
func GetServerId ¶
func HasCustomAttributes ¶
func InheritBucketAttributes ¶
func IsDirectory ¶
func IsPrivateIP ¶
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 LoadJsonFile ¶
func MarshalToFile ¶
func ModifyCustomAttributes ¶
func ModifyDefaultAttributes ¶
func PrintKeyStrValues ¶
func PrintKeyValues ¶
func RandomString ¶
RandomString generates a random string for S3 key, secret auth
func ReadAttributes ¶
func SetKeyValueAttributes ¶
func UpdateMDMany ¶
Types ¶
type ECMode ¶
func (*ECMode) DecodeString ¶
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