github.com/cayleygraph/cayley@v0.7.7/quad/formats.go (about)

     1  package quad
     2  
     3  import (
     4  	"github.com/cayleygraph/quad"
     5  )
     6  
     7  // Format is a description for quad-file formats.
     8  //
     9  // Deprecated: use github.com/cayleygraph/quad package instead.
    10  type Format = quad.Format
    11  
    12  // RegisterFormat registers a new quad-file format.
    13  //
    14  // Deprecated: use github.com/cayleygraph/quad package instead.
    15  func RegisterFormat(f Format) {
    16  	quad.RegisterFormat(f)
    17  }
    18  
    19  // FormatByName returns a registered format by its name.
    20  // Will return nil if format is not found.
    21  //
    22  // Deprecated: use github.com/cayleygraph/quad package instead.
    23  func FormatByName(name string) *Format {
    24  	return quad.FormatByName(name)
    25  }
    26  
    27  // FormatByExt returns a registered format by its file extension.
    28  // Will return nil if format is not found.
    29  //
    30  // Deprecated: use github.com/cayleygraph/quad package instead.
    31  func FormatByExt(name string) *Format {
    32  	return quad.FormatByExt(name)
    33  }
    34  
    35  // FormatByMime returns a registered format by its MIME type.
    36  // Will return nil if format is not found.
    37  //
    38  // Deprecated: use github.com/cayleygraph/quad package instead.
    39  func FormatByMime(name string) *Format {
    40  	return quad.FormatByMime(name)
    41  }
    42  
    43  // Formats returns a list of all supported quad formats.
    44  //
    45  // Deprecated: use github.com/cayleygraph/quad package instead.
    46  func Formats() []Format {
    47  	return quad.Formats()
    48  }